canary/data/scripts/creaturescripts/extended_opcode.lua
Eduardo Dantas e7acbce5a2
Removed unnecessary files and converted to client id (#1)
Removed several files and other unnecessary things
Converts ids to client id
2021-04-27 18:37:05 -03:00

18 lines
507 B
Lua

local OPCODE_LANGUAGE = 1
local extendedOpcode = CreatureEvent("ExtendedOpcode")
function extendedOpcode.onExtendedOpcode(player, opcode, buffer)
if opcode == OPCODE_LANGUAGE then
-- otclient language
if buffer == 'en' or buffer == 'pt' then
-- example, setting player language, because otclient is multi-language...
-- player:setStorageValue(SOME_STORAGE_ID, SOME_VALUE)
end
else
-- other opcodes can be ignored, and the server will just work fine...
end
end
extendedOpcode:register()