Em lua não há arrays, há tabelas. Estas começam por 1 e não por 0.
@Keyorh experimenta o seguinte:
quest quest2_test begin
state start begin
when kill with not npc.is_pc() begin
local empire = pc.get_empire()
local data = {
{CHUNJO_BOSS_VNUM, JINNO_BOSS_VNUM, {REWARD1, REWARD2, ETC}}, -- Shinsoo
{SHINSOO_BOSS_VNUM, JINNO_BOSS_VNUM, {REWARD3, REWARD4, ETC}}, -- Chunjo
{SHINSOO_BOSS_VNUM, CHUNJO_BOSS_VNUM, {REWARD5, REWARD6, ETC}}, -- Jinno
}
local rewards = data[empire][3]
for i = 1, 2 do
if npc.get_race() == data[empire][i] then
game.drop_item_with_ownership(rewards[number(1, table.getn(rewards))])
break
end
end
end
end
end
Tem em conta que deves editar os espaços indicados na tabela data, que são todos os _VNUM e os REWARD.