Mein Versuch:
Code:
quest bt begin
state start begin
when 50134.use begin
chat("Du hast " ..item_name(item.vnum).. " geöffnet.")
if pc.job() == 0 then
local b = {
50401, 50402, 50403, 50403, 50404, -- Krieger
50416, 50417, 50418, 50419, 50420}
local rb = number(1, table.getn(b))
pc.give_item2(b[rb], 1)
pc.remove_item(item.vnum)
elseif pc.job() == 1 then
local b == {
50431, 50432, 50433, 50434, 50435, -- NINJA
50446, 50447, 50448, 50449, 50550}
local rb = number(1, table.getn(b))
pc.give_item2(b[rb], 1)
pc.remove_item(item.vnum)
elseif pc.job() == 2 then
local b == {
50461, 50462, 50463, 50464, 50465, 50466, -- SURA
50476, 50477, 50478, 50479, 50480, 50481}
local rb = number(1, table.getn(b))
pc.give_item2(b[rb], 1)
pc.remove_item(item.vnum)
elseif pc.job() == 3 then
local b == {
50491, 50492, 50493, 50494, 50495, 50496, -- SCHAMIE
50506, 50507, 50508, 50509, 50510, 50511}
local rb = number(1, table.getn(b))
pc.give_item2(b[rb], 1)
pc.remove_item(item.vnum)
end
end
end
Danke schonmal







