arcemu/arcemu — Issue #94: Lua CreatePacket(opcode, size)
Author: Lokenn
Created: 2012-01-30 05:56:04+00:00
State: open

Not working for some reason...

attempt to call global "CreatePacket" (a nil value)

INSERT INTO `worldstate_templates` (`map`, `zone`, `field`, `value`) VALUES ('0', '139', '2426', '0');

TEST = {}
function TEST.OnEnterWorld( player, event )
local p = CreatePacket( 706, 18 );
p:WriteULong( 0 ) --//map
p:WriteULong( 139 ) --//zone
p:WriteULong( 0 )
p:WriteUShort( 1 )
p:WriteULong( 2426 )
p:WriteULong( 1 )
SendPacketToPlayer(p)
end

RegisterServerHook( 4, "TEST.OnEnterWorld" );