forgottenserver/data/creaturescripts/scripts/extended_opcode.lua

14 lines
408 B
Lua
Raw Permalink Normal View History

2013-11-12 18:25:25 +01:00
local OPCODE_LANGUAGE = 1
2013-11-12 18:18:22 +01:00
2013-11-12 18:44:39 +01:00
function onExtendedOpcode(player, opcode, buffer)
2013-11-12 18:18:22 +01:00
if opcode == OPCODE_LANGUAGE then
-- otclient language
if buffer == 'en' or buffer == 'pt' then
-- example, setting player language, because otclient is multi-language...
2013-11-12 18:44:39 +01:00
-- player:setStorageValue(SOME_STORAGE_ID, SOME_VALUE)
2013-11-12 18:18:22 +01:00
end
else
-- other opcodes can be ignored, and the server will just work fine...
end
2013-11-07 23:49:36 +01:00
end