Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions modules/client_entergame/entergame.otmod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Module
author: edubart
website: https://github.com/edubart/otclient

dependencies:
- client_topmenu
load-later:
- game_features
- game_things

@onLoad: |
dofile 'entergame'
Expand Down
220 changes: 220 additions & 0 deletions modules/game_features/features.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,220 @@
controller = Controller:new()
controller:registerEvents(g_game, {
onClientVersionChange = function(version)
g_game.enableFeature(GameFormatCreatureName);

if version >= 750 then
g_game.enableFeature(GameSoul);
end

if version >= 760 then
g_game.enableFeature(GameLevelU16);
end

if version >= 770 then
g_game.enableFeature(GameLooktypeU16);
g_game.enableFeature(GameMessageStatements);
g_game.enableFeature(GameLoginPacketEncryption);
end

if version >= 780 then
g_game.enableFeature(GamePlayerAddons);
g_game.enableFeature(GamePlayerStamina);
g_game.enableFeature(GameNewFluids);
g_game.enableFeature(GameMessageLevel);
g_game.enableFeature(GamePlayerStateU16);
g_game.enableFeature(GameNewOutfitProtocol);
end

if version >= 790 then
g_game.enableFeature(GameWritableDate);
end

if version >= 840 then
g_game.enableFeature(GameProtocolChecksum);
g_game.enableFeature(GameAccountNames);
g_game.enableFeature(GameDoubleFreeCapacity);
end

if version >= 841 then
g_game.enableFeature(GameChallengeOnLogin);
g_game.enableFeature(GameMessageSizeCheck);
end

if version >= 854 then
g_game.enableFeature(GameCreatureEmblems);
end

if version >= 860 then
g_game.enableFeature(GameAttackSeq);
end

if version >= 862 then
g_game.enableFeature(GamePenalityOnDeath);
end

if version >= 870 then
g_game.enableFeature(GameDoubleExperience);
g_game.enableFeature(GamePlayerMounts);
g_game.enableFeature(GameSpellList);
end

if version >= 910 then
g_game.enableFeature(GameNameOnNpcTrade);
g_game.enableFeature(GameTotalCapacity);
g_game.enableFeature(GameSkillsBase);
g_game.enableFeature(GamePlayerRegenerationTime);
g_game.enableFeature(GameChannelPlayerList);
g_game.enableFeature(GameEnvironmentEffect);
g_game.enableFeature(GameItemAnimationPhase);
end

if version >= 940 then
g_game.enableFeature(GamePlayerMarket);
end

if version >= 953 then
g_game.enableFeature(GamePurseSlot);
g_game.enableFeature(GameClientPing);
end

if version >= 960 then
g_game.enableFeature(GameSpritesU32);
g_game.enableFeature(GameOfflineTrainingTime);
end

if version >= 963 then
g_game.enableFeature(GameAdditionalVipInfo);
end

if version >= 980 then
g_game.enableFeature(GamePreviewState);
g_game.enableFeature(GameClientVersion);
end

if version >= 981 then
g_game.enableFeature(GameLoginPending);
g_game.enableFeature(GameNewSpeedLaw);
end

if version >= 984 then
g_game.enableFeature(GameContainerPagination);
g_game.enableFeature(GameBrowseField);
end

if version >= 1000 then
g_game.enableFeature(GameThingMarks);
g_game.enableFeature(GamePVPMode);
end

if version >= 1035 then
g_game.enableFeature(GameDoubleSkills);
g_game.enableFeature(GameBaseSkillU16);
end

if version >= 1036 then
g_game.enableFeature(GameCreatureIcons);
g_game.enableFeature(GameHideNpcNames);
end

if version >= 1038 then
g_game.enableFeature(GamePremiumExpiration);
end

if version >= 1050 then
g_game.enableFeature(GameEnhancedAnimations);
end

if version >= 1053 then
g_game.enableFeature(GameUnjustifiedPoints);
end

if version >= 1054 then
g_game.enableFeature(GameExperienceBonus);
end

if version >= 1055 then
g_game.enableFeature(GameDeathType);
end

if version >= 1057 then
g_game.enableFeature(GameIdleAnimations);
end

if version >= 1061 then
g_game.enableFeature(GameOGLInformation);
end

if version >= 1071 then
g_game.enableFeature(GameContentRevision);
end

if version >= 1072 then
g_game.enableFeature(GameAuthenticator);
end

if version >= 1074 then
g_game.enableFeature(GameSessionKey);
end

if version >= 1080 then
g_game.enableFeature(GameIngameStore);
end

if version >= 1092 then
g_game.enableFeature(GameIngameStoreServiceType);
end

if version >= 1093 then
g_game.enableFeature(GameIngameStoreHighlights);
end

if version >= 1094 then
g_game.enableFeature(GameAdditionalSkills);
end

if version >= 1200 then
g_game.enableFeature(GamePrey);
g_game.enableFeature(GameThingQuickLoot);
g_game.enableFeature(GameTournamentPackets);
g_game.enableFeature(GameVipGroups);
end

if version >= 1260 then
g_game.enableFeature(GameThingQuiver);
end

if version >= 1264 then
g_game.enableFeature(GameThingPodium);
end

if version >= 1272 then
g_game.enableFeature(GameThingUpgradeClassification);
end

if version >= 1281 then
g_game.disableFeature(GameEnvironmentEffect);
g_game.disableFeature(GameItemAnimationPhase);
end

if version >= 1290 then
g_game.enableFeature(GameSequencedPackets);
g_game.enableFeature(GameThingClock);
g_game.enableFeature(GameThingCounter);
g_game.enableFeature(GameThingPodiumItemType);
g_game.enableFeature(GameDoubleShopSellAmount);
end

if version >= 1300 then
g_game.enableFeature(GameDoubleHealth);
g_game.enableFeature(GameUshortSpell);
g_game.enableFeature(GameConcotions);
g_game.enableFeature(GameAnthem);
end

if version >= 1314 then
g_game.disableFeature(GameTournamentPackets);
g_game.enableFeature(GameDynamicForgeVariables);
end
end
})
8 changes: 8 additions & 0 deletions modules/game_features/features.otmod
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Module
name: game_features
description: Manager game features
reloadable: false
sandboxed: true
scripts: [features]
@onLoad: controller:init()
@onUnload: controller:terminate()
25 changes: 14 additions & 11 deletions modules/gamelib/const.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,16 @@ GameLooktypeU16 = 42
GamePlayerStamina = 43
GamePlayerAddons = 44
GameMessageStatements = 45
GameMesssageLevel = 46
GameMessageLevel = 46
GameNewFluids = 47
GamePlayerStateU16 = 48
GameNewOutfitProtocol = 49
GamePVPMode = 50
GameWritableDate = 51
GameAdditionalVipInfo = 52
GameBaseSkillU16 = 53
GameCreatureIcons = 54
GameHideNpcNames = 55
GameSpritesAlphaChannel = 56
GamePremiumExpiration = 57
GameBrowseField = 58
Expand Down Expand Up @@ -178,10 +181,10 @@ GameCreatureShader = 102
GameCreatureAttachedEffect = 103

TextColors = {
red = '#f55e5e', -- '#c83200'
red = '#f55e5e', -- '#c83200'
orange = '#f36500', -- '#c87832'
yellow = '#ffff00', -- '#e6c832'
green = '#00EB00', -- '#3fbe32'
green = '#00EB00', -- '#3fbe32'
lightblue = '#5ff7f7',
blue = '#9f9dfd',
-- blue1 = '#6e50dc',
Expand Down Expand Up @@ -256,16 +259,16 @@ MessageModes = {
}

OTSERV_RSA = '1091201329673994292788609605089955415282375029027981291234687579' ..
'3726629149257644633073969600111060390723088861007265581882535850' ..
'3429057592827629436413108566029093628212635953836686562675849720' ..
'6207862794310902180176810615217550567108238764764442605581471797' ..
'07119674283982419152118103759076030616683978566631413'
'3726629149257644633073969600111060390723088861007265581882535850' ..
'3429057592827629436413108566029093628212635953836686562675849720' ..
'6207862794310902180176810615217550567108238764764442605581471797' ..
'07119674283982419152118103759076030616683978566631413'

CIPSOFT_RSA = '1321277432058722840622950990822933849527763264961655079678763618' ..
'4334395343554449668205332383339435179772895415509701210392836078' ..
'6959821132214473291575712138800495033169914814069637740318278150' ..
'2907336840325241747827401343576296990629870233111328210165697754' ..
'88792221429527047321331896351555606801473202394175817'
'4334395343554449668205332383339435179772895415509701210392836078' ..
'6959821132214473291575712138800495033169914814069637740318278150' ..
'2907336840325241747827401343576296990629870233111328210165697754' ..
'88792221429527047321331896351555606801473202394175817'

-- set to the latest Tibia.pic signature to make otclient compatible with official tibia
PIC_SIGNATURE = 0x56C5DDE7
Expand Down
3 changes: 0 additions & 3 deletions modules/gamelib/gamelib.otmod
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ Module
author: OTClient team
website: https://github.com/edubart/otclient

dependencies:
- game_things

@onLoad: |
dofile 'const'
dofile 'util'
Expand Down
Loading