Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onDrawGui = function(party, g)
end,
onRest = function(party)
if ( findEntity("GTK") ) then
if ( GTK.Core.GUI:isPartyLocked() ) then
return false;
end
end
end,
onWakeUp = function(party)
if ( findEntity("GTK") ) then
if ( GTK.Core.GUI:isPartyLocked() ) then
return false;
end
end
end
}
}
}Code: Select all
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onCastSpell =
function(party,champion,spellName)
local itemName = "scroll_"..spellName
for i = 1, 32, 1 do
if champion:getItem(i) ~= nil and champion:getItem(i).go.name == itemName then
return true
end
end
hudPrint(champion:getName().." needs to have the spell scroll on him to be able to cast it")
return false
end
}
}
}