I attempted to make a spell using this
Code: Select all
defineObject{
name = "catalytic_1",
uiName = "Catalytic Blast",
onCast = function(self)
local r = math.random()
if r < 0.25 then
self.go.champion:shootProjectile("rs_frostburst_2")
elseif r < 0.5 then
self.go.champion:shootProjectile("rs_poison_cloud_small_2")
elseif r < 0.75 then
self.go.monster:shootProjectile("rs_shockburst_2")
else
self.go.champion:shootProjectile("rs_fireburst")
end
end
}
And the weapon having this
Code: Select all
defineObject{
name = "rs_staff_catalytic",
baseObject = "base_item",
components = {
{
class = "Model",
model = "assets/models/items/acolyte_staff.fbx",
},
{
class = "Item",
uiName = "Catalytic Staff",
description = "This staff makes destructive spells more powerful. (Tier 1)",
gfxIndex = 340,
gfxIndexPowerAttack = 450,
impactSound = "impact_blunt",
weight = 3.5,
secondaryAction = "cast",
},
{
class = "EquipmentItem",
slot = "Weapon",
willpower = 5,
},
{
class = "CastSpell",
name = "cast",
uiName = "Catalytic Blast",
spell = "catalytic_1",
energyCost = 50,
cooldown = 2.2,
requirements = { "air_magic", 1, "earth_magic", 1, "water_magic", 1, "fire_magic", 1 },
},
},
} -- tier 5
It's popping up telling me unknown spell or unknown wand spell.