Raw l2c_RequestBypassToServer() and l2c_RequestLinkHtml() functions to send raw bypasses to server
This commit is contained in:
parent
75afe64b36
commit
5be9cb1c61
@ -26,6 +26,8 @@ void SE_funcs_register( lua_State *L )
|
||||
lua_register( L, "l2c_npcDlg", l2c_npcDlg );
|
||||
lua_register( L, "l2c_npcDlgClear", l2c_npcDlgClear );
|
||||
lua_register( L, "l2c_npcDlgExists", l2c_npcDlgExists );
|
||||
lua_register( L, "l2c_RequestBypassToServer", l2c_RequestBypassToServer );
|
||||
lua_register( L, "l2c_RequestLinkHtml", l2c_RequestLinkHtml );
|
||||
// Moving
|
||||
lua_register( L, "l2c_getPos", l2c_getPos );
|
||||
lua_register( L, "l2c_moveTo", l2c_moveTo );
|
||||
|
@ -24,6 +24,8 @@ int l2c_sayPm( lua_State *L );
|
||||
int l2c_npcDlg( lua_State *L );
|
||||
int l2c_npcDlgClear( lua_State *L );
|
||||
int l2c_npcDlgExists( lua_State *L );
|
||||
int l2c_RequestBypassToServer( lua_State *L );
|
||||
int l2c_RequestLinkHtml( lua_State *L );
|
||||
// Moving
|
||||
int l2c_getPos( lua_State *L );
|
||||
int l2c_moveTo( lua_State *L );
|
||||
|
@ -138,3 +138,32 @@ int l2c_npcDlgExists( lua_State *L )
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// l2c_RequestBypassToServer( string bypass )
|
||||
int l2c_RequestBypassToServer( lua_State *L )
|
||||
{
|
||||
int nArgs = lua_gettop( L );
|
||||
if( nArgs < 1 ) return 0;
|
||||
if( !g_game_client ) return 0;
|
||||
const char *abypass = lua_tolstring( L, 1, NULL );
|
||||
if( !abypass ) return 0;
|
||||
wchar_t wsz[512];
|
||||
MultiByteToWideChar( CP_ACP, 0, abypass, -1, wsz, 511 );
|
||||
PGen_RequestBypassToserver( wsz );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// l2c_RequestLinkHtml( string link )
|
||||
int l2c_RequestLinkHtml( lua_State *L )
|
||||
{
|
||||
int nArgs = lua_gettop( L );
|
||||
if( nArgs < 1 ) return 0;
|
||||
if( !g_game_client ) return 0;
|
||||
const char *abypass = lua_tolstring( L, 1, NULL );
|
||||
if( !abypass ) return 0;
|
||||
wchar_t wsz[512];
|
||||
MultiByteToWideChar( CP_ACP, 0, abypass, -1, wsz, 511 );
|
||||
PGen_RequestLinkHtml( wsz );
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user