Extended opcodes is a system to allow adding new opcodes to game protocol using just lua scripts in both client and server sides, thus making easy to implement new client/server side features independently of the game cor made in C++. Just one opcode is supported at the moment, the 0x01 which is sent by the client informing the current player language. New opcodes will be added in the future, including opcodes for playing sounds and new interfaces.
protocolgame.h
-[Diff] protocolgame.h - Pastebin.com
protocolgame.cpp
-[Diff] protocolgame.cpp - Pastebin.com
const.h
-[Diff] const.h - Pastebin.com
luascript.h
-[Diff] luascript.h - Pastebin.com
luascript.cpp
-[Diff] luascript.cpp - Pastebin.com
player.h
-[Diff] player.h - Pastebin.com
creatureevent.h
-[Diff] creatureevent.h - Pastebin.com
creatureevent.cpp
-[Diff] creatureevent.cpp - Pastebin.com
game.h
-[Diff] game.h - Pastebin.com
game.cpp
-[Diff] game.cpp - Pastebin.com
/creaturescripts/creaturescrips.xml
-[Diff] creaturescripts.xml - Pastebin.com
/creaturescripts/extendedopcode.lua
-
protocolgame.h
-[Diff] protocolgame.h - Pastebin.com
protocolgame.cpp
-[Diff] protocolgame.cpp - Pastebin.com
const.h
-[Diff] const.h - Pastebin.com
luascript.h
-[Diff] luascript.h - Pastebin.com
luascript.cpp
-[Diff] luascript.cpp - Pastebin.com
player.h
-[Diff] player.h - Pastebin.com
creatureevent.h
-[Diff] creatureevent.h - Pastebin.com
creatureevent.cpp
-[Diff] creatureevent.cpp - Pastebin.com
game.h
-[Diff] game.h - Pastebin.com
game.cpp
-[Diff] game.cpp - Pastebin.com
/creaturescripts/creaturescrips.xml
-[Diff] creaturescripts.xml - Pastebin.com
/creaturescripts/extendedopcode.lua
-
LUA:
extendedopcode.lua - Pastebin.com[/url]
Or the raw patch file here: [url]https://github.com/edubart/otclient/blob/master/tools/tfs_extendedopcode.patch[/url]
Haven't tested these exact edits, let me know if there are any issues.
Credits to edubart
Last edited: