2005-10-08 13:02:10 +02:00
|
|
|
|
function creation_message(mage, type)
|
|
|
|
|
msg = message("item_create_spell")
|
|
|
|
|
msg:set_unit("mage", mage)
|
|
|
|
|
msg:set_int("number", 1)
|
|
|
|
|
msg:set_resource("item", type)
|
|
|
|
|
return msg
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe ein Flammenschwert
|
2005-10-09 00:02:42 +02:00
|
|
|
|
local function create_item(mage, level, name)
|
|
|
|
|
local msg = creation_message(mage, name)
|
2005-10-08 13:02:10 +02:00
|
|
|
|
msg:send_faction(mage.faction)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
mage:add_item(name, 1);
|
2005-10-08 13:02:10 +02:00
|
|
|
|
return level
|
|
|
|
|
end
|
|
|
|
|
|
2005-10-09 00:02:42 +02:00
|
|
|
|
-- Erschaffe ein Flammenschwert
|
|
|
|
|
function create_firesword(r, mage, level, force)
|
|
|
|
|
return create_item(mage, level, "firesword")
|
|
|
|
|
end
|
|
|
|
|
|
2005-10-08 13:02:10 +02:00
|
|
|
|
-- Erschaffe einen G<>rtel der Trollst<73>rke
|
|
|
|
|
function create_trollbelt(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "trollbelt")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe einen Ring der Unsichtbarkeit
|
|
|
|
|
function create_roi(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "roi")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe einen Ring der flinken Finger
|
|
|
|
|
function create_roqf(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "roqf")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe ein Amulett des wahren Sehens
|
2005-10-09 00:02:42 +02:00
|
|
|
|
function create_aots(r, mage, level, force)
|
|
|
|
|
return create_item(mage, level, "aots")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe einen magischen Kr<4B>uterbeutel
|
|
|
|
|
function create_magicherbbag(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "magicherbbag")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- Erschaffe einen Taktikkristal
|
|
|
|
|
function create_dreameye(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "dreameye")
|
2005-10-08 13:02:10 +02:00
|
|
|
|
end
|
|
|
|
|
|
2005-10-08 20:27:40 +02:00
|
|
|
|
-- Erschaffe einen Antimagiekristall
|
|
|
|
|
function create_antimagic(r, mage, level, force)
|
2005-10-09 00:02:42 +02:00
|
|
|
|
return create_item(mage, level, "antimagic")
|
2005-10-08 20:27:40 +02:00
|
|
|
|
end
|
|
|
|
|
|