
I have also posted up a few items from the available half of Labyrinth of Lies... weapons, armour, accessories and herbs...
There are links to the models/textures/icon atlas and also the scripts for materials and items.lua
Enjoy!!!
Code: Select all
defineObject{
name = "iron_knuckles",
class = "Item",
uiName = "Iron Knuckles",
model = "assets/models/items/pit_gauntlets.fbx",
gfxIndex = 18,
skill = "unarmed_combat",
slot = "Gauntlet",
requiredLevel = 5
protection = 1,
strength = 1,
weight = 1.2,
}
Code: Select all
cloneObject{
name = "party",
baseObject = "party",
onAttack = function(champion, weapon, skill)
return attackingWeaponScripts.specialWeaponAttacks(champion, weapon, skill)
end
}
Code: Select all
function specialWeaponAttacks(champion, weapon, skill)
--------------------------previous weapon checks------------------------
--example------------------------------------------------------------------
--if (weapon ~= nil) and (weapon.name == "shock_maul") then------
--return attackingWeaponScripts.burstSpellAttacks(champion,weapon,skill)
--end-----------------------------------------------------------------------
------------------------------------------------------------------------------
if weapon == nil then
for slot = 9,10 do
item = champion:getItem(slot)
if item ~= nil then
if item.name == "iron_knuckles" then
return unarmedScripts.unarmedAttacks(champion,item,skill)
end
end
end
return true
end
end
Code: Select all
monstersList = {------------all monsters listed here-------------}
fist_monster = ""
function isInMonsterTable(table, element)
for _,value in pairs(table) do
if value == element then
return true
end
end
return false
end
function whichMonster(level,eggs,why)
for i in entitiesAt(level,eggs,why) do
if isInMonsterTable(monstersList,i.name) then
return i.id
end
end
return ""
end
function unarmedAttacks(champion, item, skill) ----checks for which unarmed combat gauntlet it is--------
local skill = champion:getSkillLevel("unarmed_combat")
local fist_champ = champion
if item.name == "iron knuckles" then
return unarmedScripts.ironKnuckles(champion, item, skill)
end
if item.name == "spiked_gauntlet" then
return unarmedScripts.spikedGauntlet(champion, item, skill)
end
return true
end
function ironKnuckles(champion,item,skill)
local dx,dy = getForward(party.facing)
fist_champ = champion
fist_monster = whichMonster(party.level,party.x+dx,party.y+dy)
if fist_monster == "" then
return true
else
local skill = champion:getSkillLevel("unarmed_combat")
local damage = math.random(100,120)
hudPrint("damage")
damageTile(fist_monster.level,fist_monster.x,fist_monster.y,party.facing,0,"physical",damage)
return true
end
end