├── mtanksl.OpenTibia.GameData └── data │ ├── channels │ └── lib.lua │ ├── mounts │ └── lib.lua │ ├── outfits │ └── lib.lua │ ├── plugins │ ├── lib.lua │ ├── items │ │ ├── lib.lua │ │ └── creation.lua │ ├── actions │ │ ├── lib.lua │ │ ├── wrap item.lua │ │ ├── rotate item.lua │ │ ├── use item.lua │ │ ├── move creature.lua │ │ ├── move item.lua │ │ ├── use item with item.lua │ │ └── use item with creature.lua │ ├── monsters │ │ ├── lib.lua │ │ └── creation.lua │ ├── movements │ │ ├── lib.lua │ │ ├── equip.lua │ │ ├── de equip.lua │ │ ├── step in.lua │ │ └── step out.lua │ ├── players │ │ ├── lib.lua │ │ └── creation.lua │ ├── creaturescripts │ │ ├── lib.lua │ │ ├── login.lua │ │ ├── logout.lua │ │ ├── death.lua │ │ ├── kill.lua │ │ ├── earnachievement.lua │ │ ├── advancelevel.lua │ │ └── advanceskill.lua │ ├── globalevents │ │ ├── lib.lua │ │ ├── save.lua │ │ ├── startup.lua │ │ ├── shutdown.lua │ │ └── record.lua │ ├── monsterattacks │ │ └── lib.lua │ ├── talkactions │ │ ├── lib.lua │ │ └── say.lua │ ├── npcs │ │ └── creation.lua │ ├── runes │ │ └── lib.lua │ ├── spells │ │ └── lib.lua │ ├── raids │ │ └── rats.lua │ ├── weapons │ │ └── wand of inferno example.lua │ └── scripts │ │ └── npcs │ │ └── suzy.lua │ ├── quests │ └── lib.lua │ ├── scripts │ └── lib.lua │ ├── server │ └── lib.lua │ ├── values │ └── lib.lua │ ├── vocations │ └── lib.lua │ ├── gameobjectscripts │ └── lib.lua │ ├── database.db │ ├── world │ ├── 740 │ │ ├── map.otbm │ │ └── map-house.xml │ ├── 772 │ │ ├── map.otbm │ │ └── map-house.xml │ ├── 860 │ │ ├── map.otbm │ │ └── map-house.xml │ ├── 870 │ │ ├── map.otbm │ │ └── map-house.xml │ ├── 986 │ │ ├── map.otbm │ │ └── map-house.xml │ └── 1098 │ │ ├── map.otbm │ │ └── map-house.xml │ ├── clibs │ ├── mime │ │ └── core.dll │ └── socket │ │ └── core.dll │ ├── items │ ├── 740 │ │ └── items.otb │ ├── 772 │ │ └── items.otb │ ├── 860 │ │ └── items.otb │ ├── 870 │ │ └── items.otb │ ├── 986 │ │ └── items.otb │ └── 1098 │ │ └── items.otb │ ├── npcs │ ├── The Oracle.xml │ ├── Al Dee.xml │ ├── Rachel.xml │ ├── Captain Bluebear.xml │ └── Suzy.xml │ └── dlls │ └── mtanksl.OpenTibia.Plugins │ └── mtanksl.OpenTibia.Plugins.dll ├── mtanksl.OpenTibia.Build ├── .gitignore └── mtanksl.OpenTibia.Build.csproj ├── mtanksl.OpenTibia.Data ├── .gitignore └── mtanksl.OpenTibia.Data.csproj ├── mtanksl.OpenTibia.Game ├── .gitignore ├── Common │ ├── Objects │ │ └── RawConnection.cs │ └── ServerObjects │ │ └── ClientFactory.cs ├── CommandHandlers │ └── PlayerSay │ │ └── GamemasterCommandHandler.cs └── Scripts │ ├── CreatureKillScripts.cs │ ├── CreatureDeathScripts.cs │ ├── PlayerAdvanceLevelScripts.cs │ └── PlayerAdvanceSkillScripts.cs ├── mtanksl.OpenTibia.Host ├── .gitignore └── tibia772.ico ├── mtanksl.OpenTibia.IO ├── .gitignore └── mtanksl.OpenTibia.IO.csproj ├── mtanksl.OpenTibia.Tests ├── .gitignore ├── Builder │ └── Assertion.cs ├── DebugLoggerProvider.cs └── MockMessageCollectionFactory.cs ├── mtanksl.OpenTibia.Common ├── .gitignore ├── Structures │ ├── Origin.cs │ ├── Gender.cs │ ├── AmmoType.cs │ ├── AmmoAction.cs │ ├── DeathType.cs │ ├── OperatingSystem.cs │ ├── ChaseMode.cs │ ├── SafeMode.cs │ ├── FightMode.cs │ ├── WarIcon.cs │ ├── Direction.cs │ ├── AccountManagerType.cs │ ├── BlockType.cs │ ├── Rank.cs │ ├── BugReportType.cs │ ├── ChannelEvent.cs │ ├── PVPMode.cs │ ├── SpeechBubble.cs │ ├── Addon.cs │ ├── SkullIcon.cs │ ├── Race.cs │ ├── WeaponType.cs │ ├── MoveDirection.cs │ ├── Vocation.cs │ ├── FluidColor.cs │ ├── Slot.cs │ └── FloorChange.cs ├── Objects │ ├── Component.cs │ ├── IBattleCollection.cs │ ├── IMapGetTile.cs │ ├── Metadata │ │ ├── VoiceItem.cs │ │ ├── VoiceCollection.cs │ │ ├── LootItem.cs │ │ ├── AttackItem.cs │ │ └── DefenseItem.cs │ ├── GameObject.cs │ ├── IContent.cs │ ├── Waypoint.cs │ ├── DoorItem.cs │ ├── IIncomingPacket.cs │ ├── IOutgoingPacket.cs │ ├── Town.cs │ ├── FluidItem.cs │ ├── SplashItem.cs │ ├── TeleportItem.cs │ ├── IConnection.cs │ ├── IMessageCollection.cs │ ├── ReadableItem.cs │ ├── StackableItem.cs │ ├── Locker.cs │ ├── IByteArrayStream.cs │ ├── HouseTile.cs │ └── IWindowCollection.cs ├── IRecomputableSource.cs ├── mtanksl.OpenTibia.Common.csproj └── RecomputableSource.cs ├── mtanksl.OpenTibia.Host.GUI ├── .gitignore ├── tibia772.ico └── Program.cs ├── mtanksl.OpenTibia.Network ├── .gitignore ├── Packets │ ├── SubscriptionStatus.cs │ ├── AccountStatus.cs │ ├── Incoming │ │ ├── Button │ │ │ ├── StopIncomingPacket.cs │ │ │ ├── QuestsIncomingPacket.cs │ │ │ └── LogoutIncomingPacket.cs │ │ ├── Client │ │ │ ├── PingIncomingPacket.cs │ │ │ ├── EnterGame2IncomingPacket.cs │ │ │ ├── PongIncomingPacket.cs │ │ │ └── UpdateContainerIncomingPacket.cs │ │ ├── Control │ │ │ └── StopWalkIncomingPacket.cs │ │ ├── GameWindow │ │ │ ├── LeavePartyIncomingPacket.cs │ │ │ ├── SetOutfitIncomingPacket.cs │ │ │ ├── JoinPartyIncomingPacket.cs │ │ │ ├── RevokePartyIncomingPacket.cs │ │ │ ├── InviteToPartyIncomingPacket.cs │ │ │ ├── LookInBattleListIncomingPacket.cs │ │ │ ├── PassLeadershipToIncomingPacket.cs │ │ │ └── SharedExperienceIncomingPacket.cs │ │ ├── Trade │ │ │ ├── AcceptTradeIncomingPacket.cs │ │ │ └── CancelOrRejectTradeIncomingPacket.cs │ │ ├── Console │ │ │ ├── OpenNewChannelIncomingPacket.cs │ │ │ ├── CloseNpcsChannelIncomingPacket.cs │ │ │ ├── CloseReportRuleViolationChannelQuestionIncomingPacket.cs │ │ │ ├── InvitePlayerIncomingPacket.cs │ │ │ ├── ExcludePlayerIncomingPacket.cs │ │ │ ├── CloseChannelIncomingPacket.cs │ │ │ ├── ProcessReportRuleViolationIncomingPacket.cs │ │ │ └── CloseReportRuleViolationChannelAnswerIncomingPacket.cs │ │ ├── Dialog │ │ │ ├── OpenedMyPrivateChannelIncomingPacket.cs │ │ │ ├── ModalWindowAnswerIncomingPacket.cs │ │ │ ├── MountIncomingPacket.cs │ │ │ ├── OpenQuestIncomingPacket.cs │ │ │ ├── OpenedPrivateChannelIncomingPacket.cs │ │ │ ├── OpenedNewChannelIncomingPacket.cs │ │ │ └── SelectedOutfitIncomingPacket.cs │ │ ├── Store │ │ │ ├── GetObjectInfoIncomingPacket.cs │ │ │ ├── BuyStoreOffersIncomingPacket.cs │ │ │ ├── RequestStoreOffersIncomingPacket.cs │ │ │ ├── OpenTransactionHistoryIncomingPacket.cs │ │ │ └── RequestTransactionHistoryIncomingPacket.cs │ │ ├── Container │ │ │ ├── BrowseFieldIncomingPacket.cs │ │ │ ├── SeekInContainerIncomingPacket.cs │ │ │ ├── CloseContainerIncomingPacket.cs │ │ │ └── OpenParentContainerIncomingPacket.cs │ │ ├── Market │ │ │ ├── MarketBrowseIncomingPacket.cs │ │ │ ├── MarketLeaveIncomingPacket.cs │ │ │ ├── MarketAcceptOfferIncomingPacket.cs │ │ │ ├── MarketCancelOfferIncomingPacket.cs │ │ │ └── MarketCreateOfferIncomingPacket.cs │ │ └── Vip │ │ │ ├── AddVipIncomingPacket.cs │ │ │ └── RemoveVipIncomingPacket.cs │ ├── ChannelDto.cs │ ├── MountDto.cs │ ├── CounterOfferDto.cs │ ├── ExtPlayersInfoDto.cs │ ├── MissionDto.cs │ ├── Outgoing │ │ ├── Trade │ │ │ └── CloseTradeOutgoingPacket.cs │ │ ├── Client │ │ │ ├── PingRequestOutgoingPacket.cs │ │ │ ├── PingResponseOutgoingPacket.cs │ │ │ ├── SendEnterWorldOutgoingPacket.cs │ │ │ └── SendPendingStateOutgoingPacket.cs │ │ ├── NpcTrade │ │ │ └── CloseNpcTradeOutgoingPacket.cs │ │ ├── Console │ │ │ └── CloseRuleViolationOutgoingPacket.cs │ │ ├── MarketBrowseOutgoingPacket.cs │ │ └── MarketDetailOutgoingPacket.cs │ └── QuestDto.cs └── mtanksl.OpenTibia.Network.csproj ├── mtanksl.OpenTibia.Plugins ├── .gitignore ├── MonsterAttacks │ ├── MeleeMonsterAttackPlugin.cs │ ├── BoltsMonsterAttackPlugin.cs │ ├── LifeDrainMonsterAttackPlugin.cs │ ├── ManaDrainMonsterAttackPlugin.cs │ ├── ArrowsMonsterAttackPlugin.cs │ ├── SpearsMonsterAttackPlugin.cs │ ├── StarsMonsterAttackPlugin.cs │ ├── HolyMissileMonsterAttackPlugin.cs │ ├── KnivesMonsterAttackPlugin.cs │ ├── SnowballsMonsterAttackPlugin.cs │ ├── StalagmiteMonsterAttackPlugin.cs │ ├── IceWaveMonsterAttackPlugin.cs │ ├── IcicleMonsterAttackPlugin.cs │ ├── BerserkMonsterAttackPlugin.cs │ ├── BoulderThrowMonsterAttackPlugin.cs │ ├── FireWaveMonsterAttackPlugin.cs │ ├── HellsCoreMonsterAttackPlugin.cs │ ├── SmallStonesMonsterAttackPlugin.cs │ ├── EnergyBeamMonsterAttackPlugin.cs │ ├── TerraWaveMonsterAttackPlugin.cs │ ├── EnergyWaveMonsterAttackPlugin.cs │ ├── IceStrikeMonsterAttackPlugin.cs │ ├── AvalancheMonsterAttackPlugin.cs │ ├── DivineCalderaMonsterAttackPlugin.cs │ ├── EternalWinterMonsterAttackPlugin.cs │ ├── FireballMonsterAttackPlugin.cs │ ├── FlameStrikeMonsterAttackPlugin.cs │ ├── GroundshakerMonsterAttackPlugin.cs │ ├── TerraStrikeMonsterAttackPlugin.cs │ ├── WrathOfNatureMonsterAttackPlugin.cs │ ├── DeathStrikeMonsterAttackPlugin.cs │ ├── FierceBerserkMonsterAttackPlugin.cs │ ├── GreatEnergyBeamMonsterAttackPlugin.cs │ ├── HeavyMagicMissileMonsterAttackPlugin.cs │ ├── LightMagicMissileMonsterAttackPlugin.cs │ ├── RageOfTheSkiesMonsterAttackPlugin.cs │ ├── SuddenDeathMonsterAttackPlugin.cs │ ├── BurstArrowsMonsterAttackPlugin.cs │ ├── DivineMissileMonsterAttackPlugin.cs │ ├── EnergyStrikeMonsterAttackPlugin.cs │ ├── GreatFireballMonsterAttackPlugin.cs │ ├── StoneShowerMonsterAttackPlugin.cs │ ├── EtherealSpearMonsterAttackPlugin.cs │ ├── ExplosionMonsterAttackPlugin.cs │ ├── ThunderstormMonsterAttackPlugin.cs │ └── WhirlwindThrowMonsterAttackPlugin.cs └── Weapons │ ├── QuagmireRodWeaponPlugin.cs │ ├── TempestRodWeaponPlugin.cs │ ├── VolcanicRodWeaponPlugin.cs │ ├── MoonlightRodWeaponPlugin.cs │ ├── SnakebiteRodWeaponPlugin.cs │ ├── WandOfInfernoWeaponPlugin.cs │ ├── WandOfPlagueWeaponPlugin.cs │ ├── WandOfVortexWeaponPlugin.cs │ ├── WandOfDragonbreathWeaponPlugin.cs │ └── WandOfCosmicEnergyWeaponPlugin.cs ├── mtanksl.OpenTibia.Security ├── .gitignore └── mtanksl.OpenTibia.Security.csproj ├── mtanksl.OpenTibia.Threading ├── .gitignore ├── DispatcherEventCanceledEventArgs.cs └── mtanksl.OpenTibia.Threading.csproj ├── server.png ├── mtanksl.OpenTibia.Data.Common ├── .gitignore ├── Repositories │ ├── IBugReportRepository.cs │ ├── IDebugAssertRepository.cs │ ├── IRuleViolationReportRepository.cs │ ├── IHouseRepository.cs │ ├── IWorldRepository.cs │ ├── IMotdRepository.cs │ ├── IGuildRepository.cs │ ├── IServerStorageRepository.cs │ ├── IAccountRepository.cs │ ├── IPlayerRepository.cs │ └── IBanRepository.cs ├── Models │ ├── DbMotd.cs │ ├── DbPlayerStorage.cs │ ├── DbPlayerOutfit.cs │ ├── DbPlayerBless.cs │ ├── DbPlayerSpell.cs │ ├── DbPlayerAchievement.cs │ ├── DbServerStorage.cs │ ├── DbHouseAccessList.cs │ ├── DbWorld.cs │ ├── DbHouseItem.cs │ ├── DbPlayerVip.cs │ ├── DbPlayerItem.cs │ ├── DbGuildMember.cs │ ├── DbPlayerDepotItem.cs │ ├── DbGuildInvitation.cs │ ├── DbPlayerKill.cs │ └── DbHouse.cs └── mtanksl.OpenTibia.Data.Common.csproj ├── mtanksl.OpenTibia.Data.InMemory ├── .gitignore └── mtanksl.OpenTibia.Data.InMemory.csproj ├── mtanksl.OpenTibia.FileFormats ├── .gitignore ├── Otb │ ├── OtbType.cs │ ├── OtbVersion.cs │ └── ItemGroup.cs ├── Xml │ ├── Npcs │ │ ├── VoiceItem.cs │ │ ├── HealthItem.cs │ │ ├── LightItem.cs │ │ ├── VoiceCollection.cs │ │ └── LookItem.cs │ └── Monsters │ │ ├── HealthItem.cs │ │ ├── LightItem.cs │ │ ├── VoiceItem.cs │ │ ├── ChangeTargetStrategy.cs │ │ ├── VoiceCollection.cs │ │ ├── LootItem.cs │ │ ├── TargetStrategy.cs │ │ ├── DefenseCollection.cs │ │ ├── AttackItem.cs │ │ └── DefenseItem.cs ├── Otbm │ ├── OtbmVersion.cs │ ├── TileFlags.cs │ └── OtbmType.cs └── mtanksl.OpenTibia.FileFormats.csproj ├── mtanksl.OpenTibia.Game.Common ├── .gitignore ├── Commands │ ├── IncomingCommand.cs │ └── Incoming │ │ └── GameWindow │ │ ├── Look │ │ └── ParseLookCommand.cs │ │ └── UseItem │ │ └── ParseUseItemCommand.cs ├── Events │ ├── GameEventArgs.cs │ ├── Player │ │ ├── PlayerLoginEventArgs.cs │ │ ├── PlayerLogoutEventArgs.cs │ │ ├── PlayerCloseNpcTradeEventArgs.cs │ │ ├── PlayerCloseNpcsChannelEventArgs.cs │ │ ├── PlayerSayEventArgs.cs │ │ ├── PlayerUpdateSoulEventArgs.cs │ │ ├── PlayerYellEventArgs.cs │ │ ├── PlayerUpdateManaEventArgs.cs │ │ ├── PlayerSayToNpcEventArgs.cs │ │ ├── PlayerWhisperEventArgs.cs │ │ ├── PlayerUpdateStaminaEventArgs.cs │ │ └── PlayerUpdateCapacityEventArgs.cs │ ├── Global │ │ └── GlobalServerReloadedEventArgs.cs │ ├── Npc │ │ └── NpcSayEventArgs.cs │ ├── Monster │ │ ├── MonsterSayEventArgs.cs │ │ └── MonsterYellEventArgs.cs │ └── Creature │ │ ├── CreatureAppearEventArgs.cs │ │ ├── CreatureKillEventArgs.cs │ │ ├── CreatureDisappearEventArgs.cs │ │ ├── CreatureUpdateHealthEventArgs.cs │ │ └── CreatureUpdateInvisibleEventArgs.cs ├── Common │ ├── ServerObjects │ │ ├── IDatabaseFactory.cs │ │ ├── Config │ │ │ ├── WorldType.cs │ │ │ ├── RookingConfig.cs │ │ │ └── ExperienceStagesConfig.cs │ │ ├── IClientFactory.cs │ │ ├── IWaitingList.cs │ │ ├── IPathResolver.cs │ │ ├── CombatCollection │ │ │ ├── Hit.cs │ │ │ └── ICombatCollection.cs │ │ ├── SpawnCollection │ │ │ ├── IRaidCollection.cs │ │ │ ├── Spawner.cs │ │ │ └── ISpawnCollection.cs │ │ ├── Logger │ │ │ ├── LogLevel.cs │ │ │ ├── ILoggerProvider.cs │ │ │ └── ILogger.cs │ │ ├── IMessageCollectionFactory.cs │ │ ├── ChannelCollection │ │ │ ├── ChannelConfig.cs │ │ │ └── Statement.cs │ │ ├── LuaScriptCollection │ │ │ └── LuaException.cs │ │ ├── QuestCollection │ │ │ ├── MissionConfig.cs │ │ │ └── IQuestCollection.cs │ │ ├── IPathfinding.cs │ │ ├── PacketsFactory │ │ │ └── IPacketToCommand.cs │ │ ├── OutfitCollection │ │ │ ├── IMountCollection.cs │ │ │ ├── MountConfig.cs │ │ │ └── IOutfitCollection.cs │ │ ├── NpcTradingCollection │ │ │ └── NpcTrading.cs │ │ ├── VocationCollection │ │ │ └── IVocationCollection.cs │ │ ├── IRandomization.cs │ │ ├── IScriptCollection.cs │ │ └── IGameObjectPool.cs │ └── ServerStatus.cs ├── Promises │ ├── PromiseStatus.cs │ └── PromiseCanceledException.cs ├── Plugins │ ├── Ammunition.cs │ ├── ServerSavePlugin.cs │ ├── ServerShutdownPlugin.cs │ ├── ServerStartupPlugin.cs │ ├── ServerRecordPlugin.cs │ ├── PlayerLoginPlugin.cs │ ├── PlayerLogoutPlugin.cs │ ├── CreatureKillPlugin.cs │ ├── PlayerSayPlugin.cs │ ├── PlayerUseItemPlugin.cs │ ├── PlayerWrapItemPlugin.cs │ ├── PlayerRotateItemPlugin.cs │ ├── CreatureDeathPlugin.cs │ ├── PlayerAdvanceLevelPlugin.cs │ ├── PlayerEarnAchievementPlugin.cs │ ├── PlayerMoveCreaturePlugin.cs │ ├── PlayerUseItemWithItemPlugin.cs │ ├── NpcCreationPlugin.cs │ ├── Raid.cs │ ├── ItemCreationPlugin.cs │ ├── PlayerMoveItemPlugin.cs │ ├── Weapon.cs │ ├── PlayerUseItemWithCreaturePlugin.cs │ ├── RaidPlugin.cs │ ├── PlayerCreationPlugin.cs │ ├── MonsterCreationPlugin.cs │ ├── PlayerAdvanceSkillPlugin.cs │ ├── CreatureStepInPlugin.cs │ ├── InventoryEquipPlugin.cs │ ├── CreatureStepOutPlugin.cs │ ├── InventoryDeEquipPlugin.cs │ ├── Plugin.cs │ └── MonsterAttackPlugin.cs ├── Components │ ├── Creature │ │ ├── WalkStrategy │ │ │ └── IWalkStrategy.cs │ │ ├── TargetStrategy │ │ │ └── ITargetStrategy.cs │ │ ├── ChangeTargetStrategy │ │ │ └── IChangeTargetStrategy.cs │ │ └── AttackStrategy │ │ │ └── IAttackStrategy.cs │ ├── MultipleDelayBehaviour.cs │ ├── Player │ │ └── PlayerWalkDelayBehaviour.cs │ └── Behaviour.cs ├── EventHandlers │ ├── IEventHandlerOfT.cs │ └── IEventHandler.cs ├── CommandHandlers │ ├── ICommandHandlerOfT.cs │ ├── ICommandHandler.cs │ ├── ICommandResultHandlerOfT.cs │ └── ICommandResultHandler.cs └── Scripts │ └── Script.cs ├── mtanksl.OpenTibia.Data.MsSql ├── .gitignore ├── README.md └── MsSqlContextFactory.cs ├── mtanksl.OpenTibia.Data.MySql ├── .gitignore ├── README.md └── MySqlContextFactory.cs ├── mtanksl.OpenTibia.Data.Oracle ├── .gitignore └── README.md ├── mtanksl.OpenTibia.Data.Sqlite ├── .gitignore ├── database.db.dist └── README.md ├── .github └── FUNDING.yml ├── .gitignore ├── mtanksl.OpenTibia.Data.PostgreSql ├── .gitignore └── README.md └── debugging-lua-scripts.png /mtanksl.OpenTibia.GameData/data/channels/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/mounts/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/outfits/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/quests/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/scripts/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/server/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/values/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/items/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/vocations/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/gameobjectscripts/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/monsters/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/movements/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/players/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/globalevents/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/monsterattacks/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/talkactions/lib.lua: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Build/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Host/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.IO/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Host.GUI/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Security/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Threading/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /server.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/server.png -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.InMemory/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.MsSql/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ 5 | migrations/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.MySql/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ 5 | migrations/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Oracle/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ 5 | migrations/ -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Sqlite/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ 5 | migrations/ -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: mtanksl 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs/ 2 | Tools/ 3 | OldTools/ 4 | /mtanksl.OpenTibia.Game.Common/Promises/Example.cs -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.PostgreSql/.gitignore: -------------------------------------------------------------------------------- 1 | *.suo 2 | *.user 3 | bin/ 4 | obj/ 5 | migrations/ -------------------------------------------------------------------------------- /debugging-lua-scripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/debugging-lua-scripts.png -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/globalevents/save.lua: -------------------------------------------------------------------------------- 1 | function onsave() 2 | print("Server save") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/globalevents/startup.lua: -------------------------------------------------------------------------------- 1 | function onstartup() 2 | print("Server startup") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Host/tibia772.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.Host/tibia772.ico -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/globalevents/shutdown.lua: -------------------------------------------------------------------------------- 1 | function onshutdown() 2 | print("Server shutdown") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Host.GUI/tibia772.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.Host.GUI/tibia772.ico -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/items/creation.lua: -------------------------------------------------------------------------------- 1 | function onstart(item) 2 | 3 | end 4 | 5 | function onstop(item) 6 | 7 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/npcs/creation.lua: -------------------------------------------------------------------------------- 1 | function onstart(npc) 2 | 3 | end 4 | 5 | function onstop(npc) 6 | 7 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/database.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/database.db -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/players/creation.lua: -------------------------------------------------------------------------------- 1 | function onstart(player) 2 | 3 | end 4 | 5 | function onstop(player) 6 | 7 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Sqlite/database.db.dist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.Data.Sqlite/database.db.dist -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/login.lua: -------------------------------------------------------------------------------- 1 | function onlogin(player) 2 | print("Player " .. player.Name .. " login") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/monsters/creation.lua: -------------------------------------------------------------------------------- 1 | function onstart(monster) 2 | 3 | end 4 | 5 | function onstop(monster) 6 | 7 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/logout.lua: -------------------------------------------------------------------------------- 1 | function onlogout(player) 2 | print("Player " .. player.Name .. " logout") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/740/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/740/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/772/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/772/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/860/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/860/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/870/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/870/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/986/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/986/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/clibs/mime/core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/clibs/mime/core.dll -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/1098/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/1098/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/740/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/740/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/772/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/772/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/860/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/860/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/870/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/870/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/items/986/items.otb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/items/986/items.otb -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/1098/map.otbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/world/1098/map.otbm -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/clibs/socket/core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/clibs/socket/core.dll -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/globalevents/record.lua: -------------------------------------------------------------------------------- 1 | function onrecord(count) 2 | print("New record: " .. count .. " players are logged in") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Origin.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.IO 2 | { 3 | public enum Origin 4 | { 5 | Begin, 6 | 7 | Current 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/death.lua: -------------------------------------------------------------------------------- 1 | function ondeath(creature, killer, mostdamage) 2 | print("Creature " .. creature.Name .. " died") 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/kill.lua: -------------------------------------------------------------------------------- 1 | function onkill(creature, target) 2 | print("Creature " .. creature.Name .. " killed " .. target.Name) 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Commands/IncomingCommand.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Commands 2 | { 3 | public abstract class IncomingCommand : Command 4 | { 5 | 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Gender.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum Gender : byte 4 | { 5 | Male = 0, 6 | 7 | Female = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otb/OtbType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Otb 2 | { 3 | public enum OtbType : byte 4 | { 5 | Root = 0, 6 | 7 | OtbInfo = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/AmmoType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum AmmoType : byte 4 | { 5 | Bolt = 1, 6 | 7 | Arrow = 2 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Npcs/VoiceItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Npcs 2 | { 3 | public class VoiceItem 4 | { 5 | public string Sentence { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/GameEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public abstract class GameEventArgs : EventArgs 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/talkactions/say.lua: -------------------------------------------------------------------------------- 1 | function onsay(player, message) 2 | print("Player " .. player.Name .. " said " .. message) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Component.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public abstract class Component 4 | { 5 | public GameObject GameObject { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/AmmoAction.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum AmmoAction : byte 4 | { 5 | Remove = 1, 6 | 7 | Move = 2 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/DeathType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum DeathType : byte 4 | { 5 | Regular = 0, 6 | 7 | Blessed = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/wrap item.lua: -------------------------------------------------------------------------------- 1 | function onwrapitem(player, item) 2 | print("Player " .. player.Name .. " wrapped item " .. item.Id) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/rotate item.lua: -------------------------------------------------------------------------------- 1 | function onrotateitem(player, item) 2 | print("Player " .. player.Name .. " rotated item " .. item.Id) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/IRecomputableSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public interface IRecomputableSource 6 | { 7 | event EventHandler Changed; 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/OperatingSystem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum OperatingSystem : ushort 4 | { 5 | Linux = 1, 6 | 7 | Windows = 2 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/mtanksl.OpenTibia.Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Sqlite/README.md: -------------------------------------------------------------------------------- 1 | # Adding migration 2 | 3 | dotnet ef migrations add Initial -- Data Source=database.db; 4 | 5 | # Scripting migration 6 | 7 | dotnet ef migrations script -- Data Source=database.db; -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IDatabaseFactory.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public interface IDatabaseFactory 4 | { 5 | IDatabase Create(); 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/earnachievement.lua: -------------------------------------------------------------------------------- 1 | function onearnachievement(player, achievementname) 2 | print("Player " .. player.Name .. " earned the achievement " .. achievementname) 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/SubscriptionStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public enum SubscriptionStatus : byte 4 | { 5 | Free = 0, 6 | 7 | Premium = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/ChaseMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum ChaseMode : byte 4 | { 5 | StandWhileFighting = 0, 6 | 7 | ChaseOpponent = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/Config/WorldType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public enum WorldType 4 | { 5 | NonPvp = 0, 6 | 7 | Pvp = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/use item.lua: -------------------------------------------------------------------------------- 1 | function onuseitem(player, item) 2 | print("Player " .. player.Name .. " used item " .. item.Metadata.OpenTibiaId) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Security/mtanksl.OpenTibia.Security.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Threading/DispatcherEventCanceledEventArgs.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Threading 4 | { 5 | public class DispatcherEventCanceledEventArgs : EventArgs 6 | { 7 | 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Threading/mtanksl.OpenTibia.Threading.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IBattleCollection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public interface IBattleCollection 4 | { 5 | bool IsKnownCreature(uint creatureId, out uint removeId); 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/npcs/The Oracle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Promises/PromiseStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common 2 | { 3 | public enum PromiseStatus 4 | { 5 | Pending, 6 | 7 | Fulfilled, 8 | 9 | Rejected 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/dlls/mtanksl.OpenTibia.Plugins/mtanksl.OpenTibia.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mtanksl/OpenTibia/HEAD/mtanksl.OpenTibia.GameData/data/dlls/mtanksl.OpenTibia.Plugins/mtanksl.OpenTibia.Plugins.dll -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/advancelevel.lua: -------------------------------------------------------------------------------- 1 | function onadvancelevel(player, fromlevel, tolevel) 2 | print("Player " .. player.Name .. " advanced from level " .. fromlevel .. " to level " .. tolevel) 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IMapGetTile.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public interface IMapGetTile 6 | { 7 | Tile GetTile(Position position); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Npcs/HealthItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Npcs 2 | { 3 | public class HealthItem 4 | { 5 | public int Now { get; set; } 6 | 7 | public int Max { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/move creature.lua: -------------------------------------------------------------------------------- 1 | function onmovecreature(player, creature, tile) 2 | print("Player " .. player.Name .. " moved creature " .. creature.Name) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Metadata/VoiceItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class VoiceItem 4 | { 5 | public string Sentence { get; set; } 6 | 7 | public bool Yell { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/SafeMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum SafeMode : byte 4 | { 5 | YouCanAttackAnyCharacter = 0, 6 | 7 | YouCannotAttackUnmarkedCharacter = 1 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Npcs/LightItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Npcs 2 | { 3 | public class LightItem 4 | { 5 | public int Level { get; set; } 6 | 7 | public int Color { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/Ammunition.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Plugins 2 | { 3 | public class Ammunition 4 | { 5 | public ushort OpenTibiaId { get; set; } 6 | 7 | public int Level { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/GameObject.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public abstract class GameObject 4 | { 5 | public bool IsDestroyed { get; set; } 6 | 7 | public uint Id { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otb/OtbVersion.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Otb 2 | { 3 | public enum OtbVersion : uint 4 | { 5 | Version1 = 1, 6 | 7 | Version2 = 2, 8 | 9 | Version3 = 3 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/HealthItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class HealthItem 4 | { 5 | public int Now { get; set; } 6 | 7 | public int Max { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/LightItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class LightItem 4 | { 5 | public int Level { get; set; } 6 | 7 | public int Color { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/AccountStatus.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public enum AccountStatus : byte 4 | { 5 | Ok = 0, 6 | 7 | Frozen = 1, 8 | 9 | Suspended = 2 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/FightMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum FightMode : byte 4 | { 5 | Offensive = 1, 6 | 7 | Balanced = 2, 8 | 9 | Defensive = 3 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/VoiceItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class VoiceItem 4 | { 5 | public string Sentence { get; set; } 6 | 7 | public int Yell { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IClientFactory.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public interface IClientFactory 6 | { 7 | IClient Create(); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IWaitingList.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public interface IWaitingList 4 | { 5 | bool CanLogin(string name, out int position, out byte time); 6 | } 7 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/npcs/Al Dee.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/npcs/Rachel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/ServerSavePlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public abstract class ServerSavePlugin : Plugin 6 | { 7 | public abstract Promise OnSave(); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/move item.lua: -------------------------------------------------------------------------------- 1 | function onmoveitem(player, item, tocontainer, toindex, count) 2 | print("Player " .. player.Name .. " moved item " .. item.Metadata.OpenTibiaId) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/runes/lib.lua: -------------------------------------------------------------------------------- 1 | formula = { 2 | generic = function(level, magiclevel, minx, miny, maxx, maxy) 3 | return math.floor(level * 0.2 + magiclevel * minx + miny), math.floor(level * 0.2 + magiclevel * maxx + maxy) 4 | end 5 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/spells/lib.lua: -------------------------------------------------------------------------------- 1 | formula = { 2 | generic = function(level, magiclevel, minx, miny, maxx, maxy) 3 | return math.floor(level * 0.2 + magiclevel * minx + miny), math.floor(level * 0.2 + magiclevel * maxx + maxy) 4 | end 5 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/WarIcon.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum WarIcon : byte 4 | { 5 | None = 0, 6 | 7 | Green = 1, 8 | 9 | Red = 2, 10 | 11 | Blue = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/creaturescripts/advanceskill.lua: -------------------------------------------------------------------------------- 1 | function onadvanceskill(player, skill, fromlevel, tolevel) 2 | print("Player " .. player.Name .. " advanced skill " .. skill .. " from level " .. fromlevel .. " to level " .. tolevel) 3 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Direction.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum Direction : byte 4 | { 5 | North = 0, 6 | 7 | East = 1, 8 | 9 | South = 2, 10 | 11 | West = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IBugReportRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | 3 | namespace OpenTibia.Data.Repositories 4 | { 5 | public interface IBugReportRepository 6 | { 7 | void AddBugReport(DbBugReport bugReport); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/ServerShutdownPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public abstract class ServerShutdownPlugin : Plugin 6 | { 7 | public abstract Promise OnShutdown(); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/ServerStartupPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public abstract class ServerStartupPlugin : Plugin 6 | { 7 | public abstract Promise OnStartup(); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/AccountManagerType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum AccountManagerType 4 | { 5 | None = 0, 6 | 7 | NewAccountManager = 1, 8 | 9 | AccountManager = 2 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/BlockType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum BlockType : byte 4 | { 5 | None = 0, 6 | 7 | Shield = 1, 8 | 9 | Armor = 2, 10 | 11 | Immune = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Rank.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum Rank : byte 4 | { 5 | Player = 0, 6 | 7 | Tutor = 1, 8 | 9 | Gamemaster = 2, 10 | 11 | AccountManager = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.MySql/README.md: -------------------------------------------------------------------------------- 1 | # Adding migration 2 | 3 | dotnet ef migrations add Initial -- Server=localhost;Database=mtots;User=root;Password=; 4 | 5 | # Scripting migration 6 | 7 | dotnet ef migrations script -- Server=localhost;Database=mtots;User=root;Password=; -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Oracle/README.md: -------------------------------------------------------------------------------- 1 | # Adding migration 2 | 3 | dotnet ef migrations add Initial -- Data Source=192.168.1.18;User Id=system;Password=; 4 | 5 | # Scripting migration 6 | 7 | dotnet ef migrations script -- Data Source=192.168.1.18;User Id=system;Password=; -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/ServerRecordPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public abstract class ServerRecordPlugin : Plugin 6 | { 7 | public abstract Promise OnRecord(uint count); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/BugReportType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum BugReportType : byte 4 | { 5 | Map = 0, 6 | 7 | Typo = 1, 8 | 9 | Technical = 2, 10 | 11 | Other = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/ChannelEvent.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum ChannelEvent : byte 4 | { 5 | Join = 0, 6 | 7 | Leave = 1, 8 | 9 | Invite = 2, 10 | 11 | Exclude = 3 12 | }; 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IDebugAssertRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | 3 | namespace OpenTibia.Data.Repositories 4 | { 5 | public interface IDebugAssertRepository 6 | { 7 | void AddDebugAssert(DbDebugAssert debugAssert); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/ChangeTargetStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class ChangeTargetStrategy 4 | { 5 | public int Interval { get; set; } 6 | 7 | public double Chance { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/use item with item.lua: -------------------------------------------------------------------------------- 1 | function onuseitemwithitem(player, item, toitem) 2 | print("Player " .. player.Name .. " used item " .. item.Metadata.OpenTibiaId .. " with item " .. toitem.Id) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IContent.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public interface IContent 6 | { 7 | TopOrder TopOrder { get; } 8 | 9 | IContainer Parent { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/PVPMode.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum PVPMode : byte 4 | { 5 | WhiteDove = 0, 6 | 7 | WhiteHand = 1, 8 | 9 | YellowHand = 2, 10 | 11 | RedFist = 3 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.MsSql/README.md: -------------------------------------------------------------------------------- 1 | # Adding migration 2 | 3 | dotnet ef migrations add Initial -- Server=localhost;Database=mtots;Trusted_Connection=True; 4 | 5 | # Scripting migration 6 | 7 | dotnet ef migrations script -- Server=localhost;Database=mtots;Trusted_Connection=True; -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IPathResolver.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public interface IPathResolver 4 | { 5 | bool Exists(string relativePath); 6 | 7 | string GetFullPath(string relativePath); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/npcs/Captain Bluebear.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Waypoint.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class Waypoint 6 | { 7 | public string Name { get; set; } 8 | 9 | public Position Position { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.PostgreSql/README.md: -------------------------------------------------------------------------------- 1 | # Adding migration 2 | 3 | dotnet ef migrations add Initial -- Server=localhost;Database=mtots;User Id=postgres;Password=; 4 | 5 | # Scripting migration 6 | 7 | dotnet ef migrations script -- Server=localhost;Database=mtots;User Id=postgres;Password=; -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Creature/WalkStrategy/IWalkStrategy.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Components 4 | { 5 | public interface IWalkStrategy 6 | { 7 | bool CanWalk(Creature attacker, Creature target, out Tile tile); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/actions/use item with creature.lua: -------------------------------------------------------------------------------- 1 | function onuseitemwithcreature(player, item, tocreature) 2 | print("Player " .. player.Name .. " used item " .. item.Metadata.OpenTibiaId .. " with creature " .. tocreature.Name) 3 | return true -- handled, stop process 4 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/raids/rats.lua: -------------------------------------------------------------------------------- 1 | function onraid() 2 | local rats = stage:new(10 * 60 * 1000) 3 | rats:announce("Rat plague!") 4 | rats:areaspawn("Rat", 5, 10, 930, 781, 7, 4) 5 | rats:areaspawn("Cave Rat", 5, 10, 930, 781, 7, 4) 6 | local exterminated = rats:execute() 7 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/DoorItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class DoorItem : Item 4 | { 5 | public DoorItem(ItemMetadata metadata) : base(metadata) 6 | { 7 | 8 | } 9 | 10 | public byte DoorId { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/CombatCollection/Hit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public class Hit 6 | { 7 | public int Damage { get; set; } 8 | 9 | public DateTime LastAttack { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/SpawnCollection/IRaidCollection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public interface IRaidCollection 4 | { 5 | bool Start(string name); 6 | 7 | void Start(); 8 | 9 | void Stop(); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Creature/TargetStrategy/ITargetStrategy.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Components 4 | { 5 | public interface ITargetStrategy 6 | { 7 | Player GetTarget(int ticks, Creature attacker, Player[] players); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/SpeechBubble.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum SpeechBubble : byte 4 | { 5 | None = 0, 6 | 7 | Normal = 1, 8 | 9 | Trade = 2, 10 | 11 | Quest = 3, 12 | 13 | QuestTrader = 4 14 | }; 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public interface IIncomingPacket 7 | { 8 | void Read(IByteArrayStreamReader reader, IHasFeatureFlag features); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Addon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Common.Structures 4 | { 5 | [Flags] 6 | public enum Addon : byte 7 | { 8 | None = 0, 9 | 10 | First = 1, 11 | 12 | Second = 2, 13 | 14 | Both = First | Second 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IRuleViolationReportRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | 3 | namespace OpenTibia.Data.Repositories 4 | { 5 | public interface IRuleViolationReportRepository 6 | { 7 | void AddRuleViolationReport(DbRuleViolationReport ruleViolationReport); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/Logger/LogLevel.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public enum LogLevel 4 | { 5 | Debug, 6 | 7 | Information, 8 | 9 | Warning, 10 | 11 | Error, 12 | 13 | Default 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerLoginPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerLoginPlugin : Plugin 7 | { 8 | public abstract Promise OnLogin(Player player); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public interface IOutgoingPacket 7 | { 8 | void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Metadata/VoiceCollection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class VoiceCollection 4 | { 5 | public int Interval { get; set; } 6 | 7 | public double Chance { get; set; } 8 | 9 | public VoiceItem[] Items { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Creature/ChangeTargetStrategy/IChangeTargetStrategy.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Components 4 | { 5 | public interface IChangeTargetStrategy 6 | { 7 | bool ShouldChange(int ticks, Creature attacker, Creature target); 8 | } 9 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerLogoutPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerLogoutPlugin : Plugin 7 | { 8 | public abstract Promise OnLogout(Player player); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/SkullIcon.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum SkullIcon : byte 4 | { 5 | None = 0, 6 | 7 | Yellow = 1, 8 | 9 | Green = 2, 10 | 11 | White = 3, 12 | 13 | Red = 4, 14 | 15 | Black = 5 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IMessageCollectionFactory.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using System; 3 | 4 | namespace OpenTibia.Game.Common.ServerObjects 5 | { 6 | public interface IMessageCollectionFactory : IDisposable 7 | { 8 | IMessageCollection Create(); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/Logger/ILoggerProvider.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public interface ILoggerProvider 4 | { 5 | void BeginWrite(LogLevel level); 6 | 7 | void Write(string message); 8 | 9 | void EndWrite(); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/EventHandlers/IEventHandlerOfT.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | using OpenTibia.Game.Events; 3 | 4 | namespace OpenTibia.Game.EventHandlers 5 | { 6 | public interface IEventHandler : IEventHandler where T : GameEventArgs 7 | { 8 | Promise Handle(T e); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Town.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class Town 6 | { 7 | public ushort Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | public Position Position { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Race.cs: -------------------------------------------------------------------------------- 1 | using System.Xml.Serialization; 2 | 3 | namespace OpenTibia.Common.Structures 4 | { 5 | public enum Race : byte 6 | { 7 | Blood = 0, 8 | 9 | Energy = 1, 10 | 11 | Fire = 2, 12 | 13 | Venom = 3, 14 | 15 | Undead = 4 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otbm/OtbmVersion.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Otbm 2 | { 3 | public enum OtbmVersion : uint 4 | { 5 | Version1 = 0, // 0.5.0 6 | 7 | Version2 = 1, // 0.6.0 8 | 9 | Version3 = 2, // 0.6.1 10 | 11 | Version4 = 3 // 0.7.0 (revscriptsys) 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otb/ItemGroup.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Otb 2 | { 3 | public enum ItemGroup : byte 4 | { 5 | None = 0, 6 | 7 | Ground = 1, 8 | 9 | Container = 2, 10 | 11 | Splash = 11, 12 | 13 | Fluid = 12, 14 | 15 | Deprecated = 14 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IHouseRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IHouseRepository 7 | { 8 | Task GetHouses(); 9 | 10 | void AddHouse(DbHouse house); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/CreatureKillPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class CreatureKillPlugin : Plugin 7 | { 8 | public abstract Promise OnKill(Creature creature, Creature target); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerSayPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerSayPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnSay(Player player, string message); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbMotd.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbMotd 6 | { 7 | public int Id { get; set; } 8 | 9 | [Required] 10 | [StringLength(255)] 11 | public string Message { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerUseItemPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerUseItemPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnUseItem(Player player, Item item); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IWorldRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IWorldRepository 7 | { 8 | Task GetWorlds(); 9 | 10 | Task GetWorldByName(string name); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/ChannelCollection/ChannelConfig.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public class ChannelConfig 4 | { 5 | public ushort Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public ChannelFlags Flags { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/MultipleDelayBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Components 4 | { 5 | public class MultipleDelayBehaviour : DelayBehaviour 6 | { 7 | public MultipleDelayBehaviour(TimeSpan executeIn) : base(executeIn) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerWrapItemPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerWrapItemPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnWrapItem(Player player, Item item); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/1098/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/740/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/772/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/860/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/870/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/world/986/map-house.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IMotdRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IMotdRepository 7 | { 8 | Task GetLastMessageOfTheDay(); 9 | 10 | void AddMessageOfTheDay(DbMotd motd); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/EventHandlers/IEventHandler.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | using System; 3 | 4 | namespace OpenTibia.Game.EventHandlers 5 | { 6 | public interface IEventHandler 7 | { 8 | bool IsDestroyed { get; set; } 9 | 10 | Guid Token { get; } 11 | 12 | Promise Handle(object e); 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerRotateItemPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerRotateItemPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnRotateItem(Player player, Item item); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/FluidItem.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class FluidItem : Item 6 | { 7 | public FluidItem(ItemMetadata metadata) : base(metadata) 8 | { 9 | 10 | } 11 | 12 | public FluidType FluidType { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbPlayerStorage.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Data.Models 2 | { 3 | public class DbPlayerStorage 4 | { 5 | public int PlayerId { get; set; } 6 | 7 | public int Key { get; set; } 8 | 9 | public int Value { get; set; } 10 | 11 | 12 | public DbPlayer Player { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Player/PlayerWalkDelayBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Components 4 | { 5 | public class PlayerWalkDelayBehaviour : DelayBehaviour 6 | { 7 | public PlayerWalkDelayBehaviour(TimeSpan executeIn) : base(executeIn) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.IO/mtanksl.OpenTibia.IO.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Metadata/LootItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class LootItem 4 | { 5 | public ushort OpenTibiaId { get; set; } 6 | 7 | public int KillsToGetOne { get; set; } 8 | 9 | public int CountMin { get; set; } 10 | 11 | public int CountMax { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/SplashItem.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class SplashItem : Item 6 | { 7 | public SplashItem(ItemMetadata metadata) : base(metadata) 8 | { 9 | 10 | } 11 | 12 | public FluidType FluidType { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/WeaponType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum WeaponType : byte 4 | { 5 | Sword = 1, 6 | 7 | Club = 2, 8 | 9 | Axe = 3, 10 | 11 | Shield = 4, 12 | 13 | Distance = 5, 14 | 15 | Wand = 6, 16 | 17 | Ammunition = 7 18 | } 19 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otbm/TileFlags.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.FileFormats.Otbm 4 | { 5 | [Flags] 6 | public enum TileFlags : uint 7 | { 8 | ProtectionZone = 1, 9 | 10 | NoPvpZone = 4, 11 | 12 | NoLogoutZone = 8, 13 | 14 | PvpZone = 16, 15 | 16 | Refresh = 32 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/CreatureDeathPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class CreatureDeathPlugin : Plugin 7 | { 8 | public abstract Promise OnDeath(Creature creature, Creature killer, Creature mostDamage); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/TeleportItem.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class TeleportItem : Item 6 | { 7 | public TeleportItem(ItemMetadata metadata) : base(metadata) 8 | { 9 | 10 | } 11 | 12 | public Position Position { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbPlayerOutfit.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Data.Models 2 | { 3 | public class DbPlayerOutfit 4 | { 5 | public int PlayerId { get; set; } 6 | 7 | public int OutfitId { get; set; } 8 | 9 | public int OutfitAddon { get; set; } 10 | 11 | 12 | public DbPlayer Player { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/mtanksl.OpenTibia.Data.Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerAdvanceLevelPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerAdvanceLevelPlugin : Plugin 7 | { 8 | public abstract Promise OnAdvanceLevel(Player player, ushort fromLevel, ushort toLevel); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerEarnAchievementPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerEarnAchievementPlugin : Plugin 7 | { 8 | public abstract Promise OnEarnAchievement(Player player, string achievementName); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Npcs/VoiceCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTibia.FileFormats.Xml.Npcs 4 | { 5 | public class VoiceCollection 6 | { 7 | public int Interval { get; set; } 8 | 9 | public double Chance { get; set; } 10 | 11 | public List Items { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/CommandHandlers/ICommandHandlerOfT.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Commands; 2 | using OpenTibia.Game.Common; 3 | using System; 4 | 5 | namespace OpenTibia.Game.CommandHandlers 6 | { 7 | public interface ICommandHandler : ICommandHandler where T : Command 8 | { 9 | Promise Handle(Func next, T command); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Tests/Builder/Assertion.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Network.Packets.Outgoing; 2 | using System; 3 | 4 | namespace OpenTibia.Tests 5 | { 6 | public class Assertion 7 | { 8 | public Type Type { get; set; } 9 | 10 | public int Total { get; set; } 11 | 12 | public Func Callback { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/VoiceCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTibia.FileFormats.Xml.Monsters 4 | { 5 | public class VoiceCollection 6 | { 7 | public int Interval { get; set; } 8 | 9 | public double Chance { get; set; } 10 | 11 | public List Items { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerMoveCreaturePlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerMoveCreaturePlugin : Plugin 7 | { 8 | public abstract PromiseResult OnMoveCreature(Player player, Creature creature, Tile toTile); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/LuaScriptCollection/LuaException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public class LuaException : Exception 6 | { 7 | public LuaException(string chunkName, string message) : base(chunkName + ": " + message) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerUseItemWithItemPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerUseItemWithItemPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnUseItemWithItem(Player player, Item item, Item toItem); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IConnection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public interface IConnection 4 | { 5 | string IpAddress { get; } 6 | 7 | IClient Client { get; set; } 8 | 9 | uint[] Keys { get; set; } 10 | 11 | void Send(IMessageCollection messageCollection); 12 | 13 | void Disconnect(); 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IGuildRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IGuildRepository 7 | { 8 | Task GetGuilds(); 9 | 10 | void AddGuild(DbGuild guild); 11 | 12 | void RemoveGuild(DbGuild guild); 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/LootItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class LootItem 4 | { 5 | public ushort Id { get; set; } 6 | 7 | public int? CountMin { get; set; } 8 | 9 | public int? CountMax { get; set; } 10 | 11 | public int KillsToGetOne { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/TargetStrategy.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Xml.Monsters 2 | { 3 | public class TargetStrategy 4 | { 5 | public double Nearest { get; set; } 6 | 7 | public double Weakest { get; set; } 8 | 9 | public double MostDamage { get; set; } 10 | 11 | public double Random { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Build/mtanksl.OpenTibia.Build.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/NpcCreationPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class NpcCreationPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnStart(Npc npc); 9 | 10 | public abstract PromiseResult OnStop(Npc npc); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/Raid.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Plugins 2 | { 3 | public class Raid 4 | { 5 | public string Name { get; set; } 6 | 7 | public bool Repeatable { get; set; } 8 | 9 | public int Interval { get; set; } 10 | 11 | public double Chance { get; set; } 12 | 13 | public bool Enabled { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Button/StopIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class StopIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/MeleeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class MeleeMonsterAttackPlugin : BaseMeleeMonsterAttackPlugin 6 | { 7 | public MeleeMonsterAttackPlugin() : base(null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbPlayerBless.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbPlayerBless 6 | { 7 | public int PlayerId { get; set; } 8 | 9 | [StringLength(255)] 10 | public string Name { get; set; } 11 | 12 | 13 | public DbPlayer Player { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbPlayerSpell.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbPlayerSpell 6 | { 7 | public int PlayerId { get; set; } 8 | 9 | [StringLength(255)] 10 | public string Name { get; set; } 11 | 12 | 13 | public DbPlayer Player { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerLoginEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerLoginEventArgs : GameEventArgs 6 | { 7 | public PlayerLoginEventArgs(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/ItemCreationPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class ItemCreationPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnStart(Item item); 9 | 10 | public abstract PromiseResult OnStop(Item item); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerMoveItemPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerMoveItemPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnMoveItem(Player player, Item item, IContainer toContainer, byte toIndex, byte count); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/Weapon.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public class Weapon 6 | { 7 | public ushort OpenTibiaId { get; set; } 8 | 9 | public int Level { get; set; } 10 | 11 | public int Mana { get; set; } 12 | 13 | public Vocation[] Vocations { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/movements/equip.lua: -------------------------------------------------------------------------------- 1 | function onequipping(inventory, item, slot) 2 | print("Player " .. inventory.Player.Name .. " equipping " .. item.Metadata.OpenTibiaId) 3 | return false -- not handled, continue process 4 | end 5 | 6 | function onequip(inventory, item, slot) 7 | print("Player " .. inventory.Player.Name .. " equipped " .. item.Metadata.OpenTibiaId) 8 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Host.GUI/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | 4 | namespace mtanksl.OpenTibia.Host.GUI 5 | { 6 | internal static class Program 7 | { 8 | [STAThread] 9 | static void Main() 10 | { 11 | ApplicationConfiguration.Initialize(); 12 | 13 | Application.Run(new MainForm() ); 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Button/QuestsIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class QuestsIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Client/PingIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class PingIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerLogoutEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerLogoutEventArgs : GameEventArgs 6 | { 7 | public PlayerLogoutEventArgs(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerUseItemWithCreaturePlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerUseItemWithCreaturePlugin : Plugin 7 | { 8 | public abstract PromiseResult OnUseItemWithCreature(Player player, Item item, Creature toCreature); 9 | } 10 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/RaidPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Plugins 4 | { 5 | public abstract class RaidPlugin : Plugin 6 | { 7 | public RaidPlugin(Raid raid) 8 | { 9 | Raid = raid; 10 | } 11 | 12 | public Raid Raid { get; } 13 | 14 | public abstract Promise OnRaid(); 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/npcs/Suzy.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/ChannelDto.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public class ChannelDto 4 | { 5 | public ChannelDto(ushort id, string name) 6 | { 7 | this.Id = id; 8 | 9 | this.Name = name; 10 | } 11 | 12 | public ushort Id { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Control/StopWalkIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class StopWalkIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/BoltsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class BoltsMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public BoltsMonsterAttackPlugin() : base(ProjectileType.Bolt, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/LifeDrainMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class LifeDrainMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public LifeDrainMonsterAttackPlugin() : base(null, null, DamageType.LifeDrain) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/ManaDrainMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class ManaDrainMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public ManaDrainMonsterAttackPlugin() : base(null, null, DamageType.ManaDrain) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/MoveDirection.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum MoveDirection : byte 4 | { 5 | East = 1, 6 | 7 | NorthEast = 2, 8 | 9 | North = 3, 10 | 11 | NorthWest = 4, 12 | 13 | West = 5, 14 | 15 | SouthWest = 6, 16 | 17 | South = 7, 18 | 19 | SouthEast = 8 20 | } 21 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/Config/RookingConfig.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public class RookingConfig 6 | { 7 | public bool Enabled { get; set; } 8 | 9 | public ulong ExperienceThreshold { get; set; } 10 | 11 | public Position PlayerNewPosition { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/QuestCollection/MissionConfig.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public class MissionConfig 4 | { 5 | public string Name { get; set; } 6 | 7 | public string Description { get; set; } 8 | 9 | public int StorageKey { get; set; } 10 | 11 | public int StorageValue { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/movements/de equip.lua: -------------------------------------------------------------------------------- 1 | function ondeequipping(inventory, item, slot) 2 | print("Player " .. inventory.Player.Name .. " deequipping " .. item.Metadata.OpenTibiaId) 3 | return false -- not handled, continue process 4 | end 5 | 6 | function ondeequip(inventory, item, slot) 7 | print("Player " .. inventory.Player.Name .. " deequipped " .. item.Metadata.OpenTibiaId) 8 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Button/LogoutIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class LogOutIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Client/EnterGame2IncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class EnterGame2IncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Client/PongIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class PongIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/GameWindow/LeavePartyIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class LeavePartyIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/GameWindow/SetOutfitIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class SetOutfitIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Trade/AcceptTradeIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class AcceptTradeIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/ArrowsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class ArrowsMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public ArrowsMonsterAttackPlugin() : base(ProjectileType.Arrow, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/SpearsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class SpearsMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public SpearsMonsterAttackPlugin() : base(ProjectileType.Spear, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IMessageCollection.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Network.Packets.Outgoing; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenTibia.Common.Objects 6 | { 7 | public interface IMessageCollection : IDisposable 8 | { 9 | void Add(IOutgoingPacket packet, IHasFeatureFlag features); 10 | 11 | IEnumerable GetMessages(); 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbPlayerAchievement.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbPlayerAchievement 6 | { 7 | public int PlayerId { get; set; } 8 | 9 | [StringLength(255)] 10 | public string Name { get; set; } 11 | 12 | 13 | public DbPlayer Player { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerCreationPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class PlayerCreationPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnStart(Player player); 9 | 10 | public abstract PromiseResult OnStop(Player player); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Promises/PromiseCanceledException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Common 4 | { 5 | public class PromiseCanceledException : Exception 6 | { 7 | public static readonly PromiseCanceledException Instance = new PromiseCanceledException(); 8 | 9 | private PromiseCanceledException() 10 | { 11 | 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/weapons/wand of inferno example.lua: -------------------------------------------------------------------------------- 1 | function onusingweapon(player, target, weapon) 2 | return true -- validated, continue process 3 | end 4 | 5 | function onuseweapon(player, target, weapon) 6 | local min, max = formula.wand(65, 9) 7 | command.creatureattackcreature(player, target, attack.distance(cast("System.Int64", weapon.Metadata.ProjectileType), min, max), nil) 8 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Console/OpenNewChannelIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class OpenNewChannelIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/StarsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class StarsMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public StarsMonsterAttackPlugin() : base(ProjectileType.ThrowingStar, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/QuagmireRodWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class QuagmireRodWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public QuagmireRodWeaponPlugin(Weapon weapon) : base(weapon, 45, 8, DamageType.Earth) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/TempestRodWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class TempestRodWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public TempestRodWeaponPlugin(Weapon weapon) : base(weapon, 65, 9, DamageType.Energy) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/VolcanicRodWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class VolcanicRodWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public VolcanicRodWeaponPlugin(Weapon weapon) : base(weapon, 30, 7, DamageType.Fire) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/MonsterCreationPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class MonsterCreationPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnStart(Monster monster); 9 | 10 | public abstract PromiseResult OnStop(Monster monster); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Console/CloseNpcsChannelIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class CloseNpcsChannelIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/MountDto.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public class MountDto 4 | { 5 | public MountDto(ushort mountId, string name) 6 | { 7 | this.MountId = mountId; 8 | 9 | this.Name = name; 10 | } 11 | 12 | public ushort MountId { get; set; } 13 | 14 | public string Name { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/HolyMissileMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class HolyMissileMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public HolyMissileMonsterAttackPlugin() : base(ProjectileType.Holy, null, DamageType.Holy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/KnivesMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class KnivesMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public KnivesMonsterAttackPlugin() : base(ProjectileType.ThrowingKnife, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/SnowballsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class SnowballsMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public SnowballsMonsterAttackPlugin() : base(ProjectileType.Snowball, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/StalagmiteMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class StalagmiteMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public StalagmiteMonsterAttackPlugin() : base(ProjectileType.Poison, null, DamageType.Earth) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/MoonlightRodWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class MoonlightRodWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public MoonlightRodWeaponPlugin(Weapon weapon) : base(weapon, 19, 6, DamageType.Ice) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/SnakebiteRodWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class SnakebiteRodWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public SnakebiteRodWeaponPlugin(Weapon weapon) : base(weapon, 13, 5, DamageType.Earth) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/WandOfInfernoWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class WandOfInfernoWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public WandOfInfernoWeaponPlugin(Weapon weapon) : base(weapon, 65, 9, DamageType.Fire) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/WandOfPlagueWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class WandOfPlagueWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public WandOfPlagueWeaponPlugin(Weapon weapon) : base(weapon, 30, 7, DamageType.Earth) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/WandOfVortexWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class WandOfVortexWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public WandOfVortexWeaponPlugin(Weapon weapon) : base(weapon, 13, 5, DamageType.Energy) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbServerStorage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbServerStorage 6 | { 7 | [Required] 8 | [StringLength(255)] 9 | public string Key { get; set; } 10 | 11 | [Required] 12 | [StringLength(255)] 13 | public string Value { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Commands/Incoming/GameWindow/Look/ParseLookCommand.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Commands 4 | { 5 | public abstract class ParseLookCommand : IncomingCommand 6 | { 7 | public ParseLookCommand(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IPathfinding.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public interface IPathfinding 6 | { 7 | bool CanThrow(Position fromPosition, Position toPosition); 8 | 9 | MoveDirection[] GetMoveDirections(Position fromPosition, Position toPosition, bool allowProtectionZone); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Global/GlobalServerReloadedEventArgs.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Events 2 | { 3 | public class GlobalServerReloadedEventArgs : GameEventArgs 4 | { 5 | public static readonly GlobalServerReloadedEventArgs Instance = new GlobalServerReloadedEventArgs(); 6 | 7 | private GlobalServerReloadedEventArgs() 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerCloseNpcTradeEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerCloseNpcTradeEventArgs : GameEventArgs 6 | { 7 | public PlayerCloseNpcTradeEventArgs(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/PlayerAdvanceSkillPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Common.Structures; 3 | using OpenTibia.Game.Common; 4 | 5 | namespace OpenTibia.Game.Plugins 6 | { 7 | public abstract class PlayerAdvanceSkillPlugin : Plugin 8 | { 9 | public abstract Promise OnAdvanceSkill(Player player, Skill skill, ushort fromLevel, ushort toLevel); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Trade/CancelOrRejectTradeIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class CancelOrRejectTradeIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/IceWaveMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class IceWaveMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public IceWaveMonsterAttackPlugin() : base(Offset.Wave1335, MagicEffectType.IceArea, DamageType.Ice) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/IcicleMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class IcicleMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public IcicleMonsterAttackPlugin() : base(ProjectileType.Ice, MagicEffectType.IceArea, DamageType.Ice) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/ReadableItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class ReadableItem : Item 4 | { 5 | public ReadableItem(ItemMetadata metadata) : base(metadata) 6 | { 7 | 8 | } 9 | 10 | public string Text { get; set; } 11 | 12 | public string WrittenBy { get; set; } 13 | 14 | public uint WrittenDate { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/CommandHandlers/ICommandHandler.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Commands; 2 | using OpenTibia.Game.Common; 3 | using System; 4 | 5 | namespace OpenTibia.Game.CommandHandlers 6 | { 7 | public interface ICommandHandler 8 | { 9 | bool IsDestroyed { get; set; } 10 | 11 | Guid Token { get; } 12 | 13 | Promise Handle(Func next, Command command); 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Creature/AttackStrategy/IAttackStrategy.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Components 5 | { 6 | public interface IAttackStrategy 7 | { 8 | PromiseResult CanAttack(int ticks, Creature attacker, Creature target); 9 | 10 | Promise Attack(Creature attacker, Creature target); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/CounterOfferDto.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public class CounterOfferDto 4 | { 5 | public CounterOfferDto(ushort tibiaId, byte count) 6 | { 7 | TibiaId = tibiaId; 8 | 9 | Count = count; 10 | } 11 | 12 | public ushort TibiaId { get; set; } 13 | 14 | public byte Count { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Dialog/OpenedMyPrivateChannelIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class OpenedMyPrivateChannelIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/BerserkMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class BerserkMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public BerserkMonsterAttackPlugin() : base(Offset.Square3, MagicEffectType.BlackSpark, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/BoulderThrowMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class BoulderThrowMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public BoulderThrowMonsterAttackPlugin() : base(ProjectileType.BigStone, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/FireWaveMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class FireWaveMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public FireWaveMonsterAttackPlugin() : base(Offset.Wave11333, MagicEffectType.FireArea, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/HellsCoreMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class HellsCoreMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public HellsCoreMonsterAttackPlugin() : base(Offset.Circle11, MagicEffectType.FireArea, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/SmallStonesMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class SmallStonesMonsterAttackPlugin : BaseDistanceMonsterAttackPlugin 6 | { 7 | public SmallStonesMonsterAttackPlugin() : base(ProjectileType.SmallStone, null, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/ChannelCollection/Statement.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public class Statement 6 | { 7 | public uint Id { get; set; } 8 | 9 | public int DatabasePlayerId { get; set; } 10 | 11 | public string Message { get; set; } 12 | 13 | public DateTime CreationDate { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerCloseNpcsChannelEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerCloseNpcsChannelEventArgs : GameEventArgs 6 | { 7 | public PlayerCloseNpcsChannelEventArgs(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/ExtPlayersInfoDto.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public class ExtPlayersInfoDto 4 | { 5 | public ExtPlayersInfoDto(string name, uint level) 6 | { 7 | this.Name = name; 8 | 9 | this.Level = level; 10 | } 11 | 12 | public string Name { get; set; } 13 | 14 | public uint Level { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/EnergyBeamMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class EnergyBeamMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public EnergyBeamMonsterAttackPlugin() : base(Offset.Beam5, MagicEffectType.EnergyArea, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/TerraWaveMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class TerraWaveMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public TerraWaveMonsterAttackPlugin() : base(Offset.Wave11333, MagicEffectType.PlantAttack, DamageType.Earth) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/WandOfDragonbreathWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class WandOfDragonbreathWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public WandOfDragonbreathWeaponPlugin(Weapon weapon) : base(weapon, 19, 6, DamageType.Fire) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Xml/Monsters/DefenseCollection.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTibia.FileFormats.Xml.Monsters 4 | { 5 | public class DefenseCollection 6 | { 7 | public double Mitigation { get; set; } 8 | 9 | public int Defense { get; set; } 10 | 11 | public int Armor { get; set; } 12 | 13 | public List Items { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Commands/Incoming/GameWindow/UseItem/ParseUseItemCommand.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Commands 4 | { 5 | public abstract class ParseUseItemCommand : IncomingCommand 6 | { 7 | public ParseUseItemCommand(Player player) 8 | { 9 | Player = player; 10 | } 11 | 12 | public Player Player { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/MissionDto.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Network.Packets 2 | { 3 | public class MissionDto 4 | { 5 | public MissionDto(string name, string description) 6 | { 7 | this.Name = name; 8 | 9 | this.Description = description; 10 | } 11 | 12 | public string Name { get; set; } 13 | 14 | public string Description { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/EnergyWaveMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class EnergyWaveMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public EnergyWaveMonsterAttackPlugin() : base(Offset.Wave11333, MagicEffectType.EnergyArea, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/IceStrikeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class IceStrikeMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public IceStrikeMonsterAttackPlugin() : base(ProjectileType.IceSmall, MagicEffectType.IceDamage, DamageType.Ice) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/Weapons/WandOfCosmicEnergyWeaponPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | using OpenTibia.Game.Plugins; 3 | 4 | namespace OpenTibia.Plugins.Weapons 5 | { 6 | public class WandOfCosmicEnergyWeaponPlugin : BaseWandAndRodWeaponPlugin 7 | { 8 | public WandOfCosmicEnergyWeaponPlugin(Weapon weapon) : base(weapon, 45, 8, DamageType.Energy) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Vocation.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum Vocation : byte 4 | { 5 | None = 0, 6 | 7 | Knight = 1, 8 | 9 | Paladin = 2, 10 | 11 | Druid = 3, 12 | 13 | Sorcerer = 4, 14 | 15 | EliteKnight = 5, 16 | 17 | RoyalPaladin = 6, 18 | 19 | ElderDruid = 7, 20 | 21 | MasterSorcerer = 8 22 | } 23 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Trade/CloseTradeOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class CloseTradeOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x7F ); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/AvalancheMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class AvalancheMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public AvalancheMonsterAttackPlugin() : base(Offset.Circle7, ProjectileType.Ice, MagicEffectType.IceArea, DamageType.Ice) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/DivineCalderaMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class DivineCalderaMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public DivineCalderaMonsterAttackPlugin() : base(Offset.Circle7, MagicEffectType.HolyDamage, DamageType.Holy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/EternalWinterMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class EternalWinterMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public EternalWinterMonsterAttackPlugin() : base(Offset.Circle11, MagicEffectType.IceTornado, DamageType.Ice) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/FireballMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class FireballMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public FireballMonsterAttackPlugin() : base(Offset.Circle5, ProjectileType.Fire, MagicEffectType.FireArea, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/FlameStrikeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class FlameStrikeMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public FlameStrikeMonsterAttackPlugin() : base(ProjectileType.Fire, MagicEffectType.FireDamage, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/GroundshakerMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class GroundshakerMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public GroundshakerMonsterAttackPlugin() : base(Offset.Circle7, MagicEffectType.GroundShaker, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/TerraStrikeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class TerraStrikeMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public TerraStrikeMonsterAttackPlugin() : base(ProjectileType.Poison, MagicEffectType.Carniphila, DamageType.Earth) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/WrathOfNatureMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class WrathOfNatureMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public WrathOfNatureMonsterAttackPlugin() : base(Offset.Circle11, MagicEffectType.PlantAttack, DamageType.Earth) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/StackableItem.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class StackableItem : Item 4 | { 5 | public StackableItem(ItemMetadata metadata) : base(metadata) 6 | { 7 | 8 | } 9 | 10 | public byte Count { get; set; } 11 | 12 | public override uint GetWeight() 13 | { 14 | return Count * base.GetWeight(); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/FluidColor.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum FluidColor : byte 4 | { 5 | Empty = 0, 6 | 7 | Blue = 1, 8 | 9 | Purple = 2, 10 | 11 | Brown1 = 3, 12 | 13 | Brown2 = 4, 14 | 15 | Red = 5, 16 | 17 | Green = 6, 18 | 19 | Brown = 7, 20 | 21 | Yellow = 8, 22 | 23 | White = 9 24 | } 25 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbHouseAccessList.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbHouseAccessList 6 | { 7 | public int HouseId { get; set; } 8 | 9 | public int ListId { get; set; } 10 | 11 | [Required] 12 | public string Text { get; set; } 13 | 14 | 15 | public DbHouse House { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Store/GetObjectInfoIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class OpenStoreIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.IngameStore 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Client/PingRequestOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class PingRequestOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x1D ); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Client/PingResponseOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class PingResponseOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x1E ); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/DeathStrikeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class DeathStrikeMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public DeathStrikeMonsterAttackPlugin() : base(ProjectileType.SuddenDeath, MagicEffectType.MortArea, DamageType.Death) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/FierceBerserkMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class FierceBerserkMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public FierceBerserkMonsterAttackPlugin() : base(Offset.Square3, MagicEffectType.BlackSpark, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/GreatEnergyBeamMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class GreatEnergyBeamMonsterAttackPlugin : BaseSpellBeamMonsterAttackPlugin 6 | { 7 | public GreatEnergyBeamMonsterAttackPlugin() : base(Offset.Beam7, MagicEffectType.EnergyArea, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/HeavyMagicMissileMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class HeavyMagicMissileMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public HeavyMagicMissileMonsterAttackPlugin() : base(ProjectileType.EnergySmall, null, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/LightMagicMissileMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class LightMagicMissileMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public LightMagicMissileMonsterAttackPlugin() : base(ProjectileType.EnergySmall, null, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/RageOfTheSkiesMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class RageOfTheSkiesMonsterAttackPlugin : BaseSpellAreaMonsterAttackPlugin 6 | { 7 | public RageOfTheSkiesMonsterAttackPlugin() : base(Offset.Circle11, MagicEffectType.BigClouds, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/SuddenDeathMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class SuddenDeathMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public SuddenDeathMonsterAttackPlugin() : base(ProjectileType.SuddenDeath, MagicEffectType.MortArea, DamageType.Death) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/CommandHandlers/ICommandResultHandlerOfT.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Commands; 2 | using OpenTibia.Game.Common; 3 | using System; 4 | 5 | namespace OpenTibia.Game.CommandHandlers 6 | { 7 | public interface ICommandResultHandler : ICommandResultHandler where T : CommandResult 8 | { 9 | PromiseResult Handle(Func> next, T command); 10 | } 11 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/CreatureStepInPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class CreatureStepInPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnSteppingIn(Creature creature, Tile toTile); 9 | 10 | public abstract Promise OnStepIn(Creature creature, Tile fromTile, Tile toTile); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Scripts/Script.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | 3 | namespace OpenTibia.Game.Scripts 4 | { 5 | public abstract class Script 6 | { 7 | public Context Context 8 | { 9 | get 10 | { 11 | return Context.Current; 12 | } 13 | } 14 | 15 | public abstract void Start(); 16 | 17 | public abstract void Stop(); 18 | } 19 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Container/BrowseFieldIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class BrowseFieldIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.BrowseField 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Market/MarketBrowseIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MarketBrowseIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.PlayerMarket 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Market/MarketLeaveIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MarketLeaveIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.PlayerMarket 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/NpcTrade/CloseNpcTradeOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class CloseNpcTradeOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x7C ); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/BurstArrowsMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class BurstArrowsMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public BurstArrowsMonsterAttackPlugin() : base(Offset.Square3, ProjectileType.Fire, MagicEffectType.FireArea, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/DivineMissileMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class DivineMissileMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public DivineMissileMonsterAttackPlugin() : base(ProjectileType.HolySmall, MagicEffectType.HolyDamage, DamageType.Holy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/EnergyStrikeMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class EnergyStrikeMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public EnergyStrikeMonsterAttackPlugin() : base(ProjectileType.EnergySmall, MagicEffectType.EnergyArea, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/Locker.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Objects 2 | { 3 | public class Locker : Container 4 | { 5 | public Locker(ItemMetadata metadata) : base(metadata) 6 | { 7 | 8 | } 9 | 10 | public Locker(ItemMetadata metadata, int internalListCapacity) : base(metadata, internalListCapacity) 11 | { 12 | 13 | } 14 | 15 | public ushort TownId { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/SpawnCollection/Spawner.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using System; 3 | 4 | namespace OpenTibia.Game.Common.ServerObjects 5 | { 6 | public class Spawner 7 | { 8 | public uint SpawnTime { get; set; } 9 | 10 | public Tile Tile { get; set; } 11 | 12 | public Monster Monster { get; set; } 13 | 14 | public DateTime? NextSpawn { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/InventoryEquipPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class InventoryEquipPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnEquipping(Inventory inventory, Item item, byte slot); 9 | 10 | public abstract Promise OnEquip(Inventory inventory, Item item, byte slot); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Store/BuyStoreOffersIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class BuyStoreOffersIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.IngameStore 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Client/SendEnterWorldOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class SendEnterWorldOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x0F); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Client/SendPendingStateOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class SendPendingStateOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0x0A); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/GreatFireballMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class GreatFireballMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public GreatFireballMonsterAttackPlugin() : base(Offset.Circle7, ProjectileType.Fire, MagicEffectType.FireArea, DamageType.Fire) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/StoneShowerMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class StoneShowerMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public StoneShowerMonsterAttackPlugin() : base(Offset.Circle7, ProjectileType.SmallStone, MagicEffectType.Stones, DamageType.Earth) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/PacketsFactory/IPacketToCommand.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Commands; 3 | using OpenTibia.IO; 4 | 5 | namespace OpenTibia.Game.Common.ServerObjects 6 | { 7 | public interface IPacketToCommand 8 | { 9 | string Name { get; } 10 | 11 | IncomingCommand Convert(IConnection connection, ByteArrayStreamReader reader, IHasFeatureFlag features); 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/CreatureStepOutPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class CreatureStepOutPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnSteppingOut(Creature creature, Tile fromTile); 9 | 10 | public abstract Promise OnStepOut(Creature creature, Tile fromTile, Tile toTile); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Console/CloseReportRuleViolationChannelQuestionIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class CloseReportRuleViolationChannelQuestionIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Market/MarketAcceptOfferIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MarketAcceptOfferIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.PlayerMarket 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Market/MarketCancelOfferIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MarketCancelOfferIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.PlayerMarket 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Market/MarketCreateOfferIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MarketCreateOfferIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.PlayerMarket 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Store/RequestStoreOffersIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class RequestStoreOffersIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.IngameStore 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Outgoing/Console/CloseRuleViolationOutgoingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Outgoing 5 | { 6 | public class CloseRuleViolationOutgoingPacket : IOutgoingPacket 7 | { 8 | public void Write(IByteArrayStreamWriter writer, IHasFeatureFlag features) 9 | { 10 | writer.Write( (byte)0xB1 ); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/mtanksl.OpenTibia.Network.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/EtherealSpearMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class EtherealSpearMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public EtherealSpearMonsterAttackPlugin() : base(ProjectileType.EtherenalSpear, MagicEffectType.GroundShaker, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/ExplosionMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class ExplosionMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public ExplosionMonsterAttackPlugin() : base(Offset.Circle3, ProjectileType.Explosion, MagicEffectType.ExplosionArea, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/ThunderstormMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class ThunderstormMonsterAttackPlugin : BaseRuneAreaMonsterAttackPlugin 6 | { 7 | public ThunderstormMonsterAttackPlugin() : base(Offset.Circle7, ProjectileType.Energy, MagicEffectType.EnergyDamage, DamageType.Energy) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Structures/Slot.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Common.Structures 2 | { 3 | public enum Slot : byte 4 | { 5 | Hotkey = 0, 6 | 7 | Head = 1, 8 | 9 | Necklace = 2, 10 | 11 | Backpack = 3, 12 | 13 | Body = 4, 14 | 15 | Right = 5, 16 | 17 | Left = 6, 18 | 19 | Legs = 7, 20 | 21 | Feet = 8, 22 | 23 | Ring = 9, 24 | 25 | Ammo = 10 26 | } 27 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/OutfitCollection/IMountCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OpenTibia.Game.Common.ServerObjects 5 | { 6 | public interface IMountCollection : IDisposable 7 | { 8 | void Start(); 9 | 10 | object GetValue(string key); 11 | 12 | MountConfig GetMountById(ushort id); 13 | 14 | IEnumerable GetMounts(); 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/QuestCollection/IQuestCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OpenTibia.Game.Common.ServerObjects 5 | { 6 | public interface IQuestCollection : IDisposable 7 | { 8 | void Start(); 9 | 10 | object GetValue(string key); 11 | 12 | QuestConfig GetQuestById(ushort id); 13 | 14 | IEnumerable GetQuests(); 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Npc/NpcSayEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class NpcSayEventArgs : GameEventArgs 6 | { 7 | public NpcSayEventArgs(Npc npc, string message) 8 | { 9 | Npc = npc; 10 | 11 | Message = message; 12 | } 13 | 14 | public Npc Npc { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Plugins/InventoryDeEquipPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Plugins 5 | { 6 | public abstract class InventoryDeEquipPlugin : Plugin 7 | { 8 | public abstract PromiseResult OnDeEquipping(Inventory inventory, Item item, byte slot); 9 | 10 | public abstract Promise OnDeEquip(Inventory inventory, Item item, byte slot); 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Container/SeekInContainerIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class SeekInContainerIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.ContainerPagination 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Plugins/MonsterAttacks/WhirlwindThrowMonsterAttackPlugin.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Plugins.MonsterAttacks 4 | { 5 | public class WhirlwindThrowMonsterAttackPlugin : BaseRuneTargetMonsterAttackPlugin 6 | { 7 | public WhirlwindThrowMonsterAttackPlugin() : base(ProjectileType.WhirlWindSword, MagicEffectType.GroundShaker, DamageType.Physical) 8 | { 9 | 10 | } 11 | } 12 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Tests/DebugLoggerProvider.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common.ServerObjects; 2 | using System.Diagnostics; 3 | 4 | namespace OpenTibia.Tests 5 | { 6 | public class DebugLoggerProvider : ILoggerProvider 7 | { 8 | public void BeginWrite(LogLevel level) { } 9 | 10 | public void Write(string message) 11 | { 12 | Debug.Write(message); 13 | } 14 | 15 | public void EndWrite() { } 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IServerStorageRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IServerStorageRepository 7 | { 8 | Task GetServerStorages(); 9 | 10 | Task GetServerStorageByKey(string key); 11 | 12 | void AddServerStorage(DbServerStorage serverStorage); 13 | } 14 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/Otbm/OtbmType.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.FileFormats.Otbm 2 | { 3 | public enum OtbmType : byte 4 | { 5 | Root = 0, 6 | 7 | MapInfo = 2, 8 | 9 | Area = 4, 10 | 11 | Tile = 5, 12 | 13 | Item = 6, 14 | 15 | Towns = 12, 16 | 17 | Town = 13, 18 | 19 | HouseTile = 14, 20 | 21 | Waypoints = 15, 22 | 23 | Waypoint = 16 24 | } 25 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Dialog/ModalWindowAnswerIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class ModalWindowAnswerIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.OfflineTrainingTime 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Store/OpenTransactionHistoryIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class OpenTransactionHistoryIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.IngameStore 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Store/RequestTransactionHistoryIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class RequestTransactionHistoryIncomingPacket : IIncomingPacket 7 | { 8 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 9 | { 10 | //TODO: FeatureFlag.IngameStore 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/NpcTradingCollection/NpcTrading.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Network.Packets; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenTibia.Game.Common.ServerObjects 6 | { 7 | public class NpcTrading 8 | { 9 | public Npc OfferNpc { get; set; } 10 | 11 | public List Offers { get; set; } 12 | 13 | public Player CounterOfferPlayer { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/VocationCollection/IVocationCollection.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace OpenTibia.Game.Common.ServerObjects 5 | { 6 | public interface IVocationCollection : IDisposable 7 | { 8 | void Start(); 9 | 10 | object GetValue(string key); 11 | 12 | VocationConfig GetVocationById(byte id); 13 | 14 | IEnumerable GetVocations(); 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.FileFormats/mtanksl.OpenTibia.FileFormats.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/CommandHandlers/ICommandResultHandler.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Commands; 2 | using OpenTibia.Game.Common; 3 | using System; 4 | 5 | namespace OpenTibia.Game.CommandHandlers 6 | { 7 | public interface ICommandResultHandler 8 | { 9 | bool IsDestroyed { get; set; } 10 | 11 | Guid Token { get; } 12 | 13 | PromiseResult Handle(Func> next, CommandResult command); 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Dialog/MountIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class MountIncomingPacket : IIncomingPacket 7 | { 8 | public bool IsMounted { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | IsMounted = reader.ReadBool(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Vip/AddVipIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class AddVipIncomingPacket : IIncomingPacket 7 | { 8 | public string Name { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | Name = reader.ReadString(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/IByteArrayStream.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.IO 2 | { 3 | public interface IByteArrayStream 4 | { 5 | int Position { get; } 6 | 7 | int Length { get; } 8 | 9 | void Seek(Origin origin, int offset); 10 | 11 | byte ReadByte(); 12 | 13 | void Read(byte[] buffer, int offset, int count); 14 | 15 | void WriteByte(byte value); 16 | 17 | void Write(byte[] buffer, int offset, int count); 18 | } 19 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data/mtanksl.OpenTibia.Data.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IRandomization.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OpenTibia.Game.Common.ServerObjects 4 | { 5 | public interface IRandomization 6 | { 7 | bool HasProbability(double probability); 8 | 9 | int Take(int minInclusive, int maxInclusive); 10 | 11 | T Take(IList array); 12 | 13 | T Take(IList array, int[] weights); 14 | 15 | T[] Shuffle(T[] array); 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerSayEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerSayEventArgs : GameEventArgs 6 | { 7 | public PlayerSayEventArgs(Player player, string message) 8 | { 9 | Player = player; 10 | 11 | Message = message; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Tests/MockMessageCollectionFactory.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common.ServerObjects; 3 | 4 | namespace OpenTibia.Tests 5 | { 6 | public class MockMessageCollectionFactory : IMessageCollectionFactory 7 | { 8 | public IMessageCollection Create() 9 | { 10 | return new MockMessageCollection(); 11 | } 12 | 13 | public void Dispose() 14 | { 15 | 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Common/Objects/HouseTile.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Structures; 2 | 3 | namespace OpenTibia.Common.Objects 4 | { 5 | public class HouseTile : Tile 6 | { 7 | public HouseTile(Position position) : base(position) 8 | { 9 | 10 | } 11 | 12 | public HouseTile(Position position, int internalListCapacity) : base(position, internalListCapacity) 13 | { 14 | 15 | } 16 | 17 | public House House { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Models/DbWorld.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace OpenTibia.Data.Models 4 | { 5 | public class DbWorld 6 | { 7 | public int Id { get; set; } 8 | 9 | [Required] 10 | [StringLength(255)] 11 | public string Name { get; set; } 12 | 13 | [Required] 14 | [StringLength(255)] 15 | public string Ip { get; set; } 16 | 17 | public int Port { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerUpdateSoulEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerUpdateSoulEventArgs : GameEventArgs 6 | { 7 | public PlayerUpdateSoulEventArgs(Player player, byte soul) 8 | { 9 | Player = player; 10 | 11 | Soul = soul; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public byte Soul { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerYellEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerYellEventArgs : GameEventArgs 6 | { 7 | public PlayerYellEventArgs(Player player, string message) 8 | { 9 | Player = player; 10 | 11 | Message = message; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game/Common/Objects/RawConnection.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Common; 2 | using System.Net.Sockets; 3 | 4 | namespace OpenTibia.Common 5 | { 6 | public abstract class RawConnection : RateLimitingConnection 7 | { 8 | public RawConnection(IServer server, Socket socket) : base(server, socket) 9 | { 10 | 11 | } 12 | 13 | protected override byte[] Envelope(byte[] bytes) 14 | { 15 | return bytes; 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/movements/step in.lua: -------------------------------------------------------------------------------- 1 | function onsteppingin(creature, totile) 2 | print("Creature " .. creature.Name .. " stepping in ground " .. totile.Ground.Metadata.OpenTibiaId) 3 | return false -- not handled, continue process 4 | end 5 | 6 | function onstepin(creature, fromtile, totile) 7 | print("Creature " .. creature.Name .. " stepped in ground " .. totile.Ground.Metadata.OpenTibiaId .. " from " .. (fromtile and fromtile.Ground.Metadata.OpenTibiaId or "null") ) 8 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Dialog/OpenQuestIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class OpenQuestIncomingPacket : IIncomingPacket 7 | { 8 | public ushort QuestId { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | QuestId = reader.ReadUShort(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.InMemory/mtanksl.OpenTibia.Data.InMemory.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerUpdateManaEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerUpdateManaEventArgs : GameEventArgs 6 | { 7 | public PlayerUpdateManaEventArgs(Player player, ushort mana) 8 | { 9 | Player = player; 10 | 11 | Mana = mana; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public ushort Mana { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.GameData/data/plugins/movements/step out.lua: -------------------------------------------------------------------------------- 1 | function onsteppingout(creature, fromtile) 2 | print("Creature " .. creature.Name .. " stepping out ground " .. fromtile.Ground.Metadata.OpenTibiaId) 3 | return false -- not handled, continue process 4 | end 5 | 6 | function onstepout(creature, fromtile, totile) 7 | print("Creature " .. creature.Name .. " stepped out ground " .. fromtile.Ground.Metadata.OpenTibiaId .. " to " .. (totile and totile.Ground.Metadata.OpenTibiaId or "null") ) 8 | end -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Console/InvitePlayerIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class InvitePlayerIncomingPacket : IIncomingPacket 7 | { 8 | public string Name { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | Name = reader.ReadString(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Vip/RemoveVipIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class RemoveVipIncomingPacket : IIncomingPacket 7 | { 8 | public uint CreatureId { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | CreatureId = reader.ReadUInt(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/OutfitCollection/MountConfig.cs: -------------------------------------------------------------------------------- 1 | namespace OpenTibia.Game.Common.ServerObjects 2 | { 3 | public class MountConfig 4 | { 5 | public ushort Id { get; set; } 6 | 7 | public string Name { get; set; } 8 | 9 | public int Speed { get; set; } 10 | 11 | public bool Premium { get; set; } 12 | 13 | public bool AvailableAtOnce { get; set; } 14 | 15 | public int MinClientVersion { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Components/Behaviour.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.Game.Common; 3 | 4 | namespace OpenTibia.Game.Components 5 | { 6 | public abstract class Behaviour : Component 7 | { 8 | public Context Context 9 | { 10 | get 11 | { 12 | return Context.Current; 13 | } 14 | } 15 | 16 | public abstract void Start(); 17 | 18 | public abstract void Stop(); 19 | } 20 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Monster/MonsterSayEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class MonsterSayEventArgs : GameEventArgs 6 | { 7 | public MonsterSayEventArgs(Monster monster, string message) 8 | { 9 | Monster = monster; 10 | 11 | Message = message; 12 | } 13 | 14 | public Monster Monster { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerSayToNpcEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerSayToNpcEventArgs : GameEventArgs 6 | { 7 | public PlayerSayToNpcEventArgs(Player player, string message) 8 | { 9 | Player = player; 10 | 11 | Message = message; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Events/Player/PlayerWhisperEventArgs.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | 3 | namespace OpenTibia.Game.Events 4 | { 5 | public class PlayerWhisperEventArgs : GameEventArgs 6 | { 7 | public PlayerWhisperEventArgs(Player player, string message) 8 | { 9 | Player = player; 10 | 11 | Message = message; 12 | } 13 | 14 | public Player Player { get; } 15 | 16 | public string Message { get; } 17 | } 18 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/Console/ExcludePlayerIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class ExcludePlayerIncomingPacket : IIncomingPacket 7 | { 8 | public string Name { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | Name = reader.ReadString(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Network/Packets/Incoming/GameWindow/JoinPartyIncomingPacket.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Common.Objects; 2 | using OpenTibia.IO; 3 | 4 | namespace OpenTibia.Network.Packets.Incoming 5 | { 6 | public class JoinPartyIncomingPacket : IIncomingPacket 7 | { 8 | public uint CreatureId { get; set; } 9 | 10 | public void Read(IByteArrayStreamReader reader, IHasFeatureFlag features) 11 | { 12 | CreatureId = reader.ReadUInt(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Data.Common/Repositories/IAccountRepository.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Data.Models; 2 | using System.Threading.Tasks; 3 | 4 | namespace OpenTibia.Data.Repositories 5 | { 6 | public interface IAccountRepository 7 | { 8 | Task GetAccount(string accountName, string accountPassword); 9 | 10 | Task GetAccountById(int id); 11 | 12 | Task GetAccountByName(string name); 13 | 14 | void AddDbAccount(DbAccount account); 15 | } 16 | } -------------------------------------------------------------------------------- /mtanksl.OpenTibia.Game.Common/Common/ServerObjects/IScriptCollection.cs: -------------------------------------------------------------------------------- 1 | using OpenTibia.Game.Scripts; 2 | using System; 3 | using System.Collections.Generic; 4 | 5 | namespace OpenTibia.Game.Common.ServerObjects 6 | { 7 | public interface IScriptCollection : IDisposable 8 | { 9 | void Start(); 10 | 11 | object GetValue(string key); 12 | 13 | T GetScript() where T : Script; 14 | 15 | IEnumerable