cleaning up the spell-scripts

This commit is contained in:
Enno Rehling 2005-10-08 22:02:42 +00:00
parent 8b0518690f
commit b6b5b9709b
1 changed files with 16 additions and 40 deletions

View File

@ -7,74 +7,50 @@ function creation_message(mage, type)
end
-- Erschaffe ein Flammenschwert
function create_firesword(r, mage, level, force)
mage:add_item("firesword", 1);
local msg = creation_message(mage, "firesword")
local function create_item(mage, level, name)
local msg = creation_message(mage, name)
msg:send_faction(mage.faction)
mage:add_item(name, 1);
return level
end
-- Erschaffe ein Flammenschwert
function create_firesword(r, mage, level, force)
return create_item(mage, level, "firesword")
end
-- Erschaffe einen Gürtel der Trollstärke
function create_trollbelt(r, mage, level, force)
mage:add_item("trollbelt", 1);
local msg = creation_message(mage, "trollbelt")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "trollbelt")
end
-- Erschaffe einen Ring der Unsichtbarkeit
function create_roi(r, mage, level, force)
mage:add_item("roi", 1);
local msg = creation_message(mage, "roi")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "roi")
end
-- Erschaffe einen Ring der flinken Finger
function create_roqf(r, mage, level, force)
mage:add_item("roqf", 1);
local msg = creation_message(mage, "roqf")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "roqf")
end
-- Erschaffe ein Amulett des wahren Sehens
function create_roi(r, mage, level, force)
mage:add_item("aots", 1);
local msg = creation_message(mage, "aots")
msg:send_faction(mage.faction)
return level
function create_aots(r, mage, level, force)
return create_item(mage, level, "aots")
end
-- Erschaffe einen magischen Kräuterbeutel
function create_magicherbbag(r, mage, level, force)
mage:add_item("aots", 1);
local msg = creation_message(mage, "magicherbbag")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "magicherbbag")
end
-- Erschaffe einen Taktikkristal
function create_dreameye(r, mage, level, force)
mage:add_item("", 1);
local msg = creation_message(mage, "dreameye")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "dreameye")
end
-- Erschaffe einen Antimagiekristall
function create_antimagic(r, mage, level, force)
mage:add_item("", 1);
local msg = creation_message(mage, "antimagic")
msg:send_faction(mage.faction)
return level
return create_item(mage, level, "antimagic")
end