diff --git a/modules/client_entergame/entergame.lua b/modules/client_entergame/entergame.lua index 790d864d..d22a2c20 100644 --- a/modules/client_entergame/entergame.lua +++ b/modules/client_entergame/entergame.lua @@ -18,10 +18,12 @@ local function clearAccountFields() Settings.remove('password') end -local function onError(protocol, error) +local function onError(protocol, message, connectionError) loadBox:destroy() - clearAccountFields() - local errorBox = displayErrorBox('Login Error', error) + if not connectionError then + clearAccountFields() + end + local errorBox = displayErrorBox('Login Error', message) errorBox.onOk = EnterGame.show end diff --git a/modules/otclientrc.lua b/modules/otclientrc.lua index 292cc828..44b7eff8 100644 --- a/modules/otclientrc.lua +++ b/modules/otclientrc.lua @@ -2,8 +2,10 @@ -- you can place any custom user code here Hotkeys.bind('F1', function() Game.talk('exura gran') end) -Hotkeys.bind('F2', function() Game.talk('exori flam') end) +Hotkeys.bind('F2', function() Game.talk('exori frigo') end) Hotkeys.bind('F3', function() Game.talk('exevo flam hur') end) +Hotkeys.bind('F4', function() Game.talk('exevo pan') end) +Hotkeys.bind('F5', function() Game.talk('exani tera') end) Hotkeys.bind('Ctrl+R', function() runscript('otclientrc.lua') end) if rcloaded then diff --git a/src/otclient/net/protocollogin.cpp b/src/otclient/net/protocollogin.cpp index 5e0c56d8..f6e2a232 100644 --- a/src/otclient/net/protocollogin.cpp +++ b/src/otclient/net/protocollogin.cpp @@ -82,7 +82,7 @@ void ProtocolLogin::onRecv(InputMessage& inputMessage) void ProtocolLogin::onError(const boost::system::error_code& error) { - callLuaField("onError", error.message()); + callLuaField("onError", error.message(), true); } void ProtocolLogin::sendLoginPacket() @@ -121,7 +121,7 @@ void ProtocolLogin::sendLoginPacket() void ProtocolLogin::parseError(InputMessage& inputMessage) { std::string error = inputMessage.getString(); - callLuaField("onError", error); + callLuaField("onError", error, false); } void ProtocolLogin::parseMOTD(InputMessage& inputMessage)