- Awards
- 38
Aquí les traigo un script de tofame, que he convertido a revscript.
Permite Invocar 2 Criaturas utilizando el nombre de la spell,
Permite Invocar 2 Criaturas utilizando el nombre de la spell,
Código:
local summonName = "Demon"
local summonNamex = "Demon outcast"
local spell = Spell("instant")
function spell.onCastSpell(creature, var)
local creatureSummons = creature:getSummons(summonName)
local creaturePosition = creature:getPosition()
local summonscountFuriousTroll = 0
local summonscountFrostTroll = 0
for _,creature in pairs(creatureSummons) do
if creature:getName() == "Frost Troll" then
summonscountFrostTroll = 1
end
if creature:getName() == "Furious Troll" then
summonscountFuriousTroll = 1
end
end
if summonscountFrostTroll == 0 then
local summon = Game.createMonster(summonName, creaturePosition)
summon:setMaster(creature)
summon:setDropLoot(false)
summon:registerEvent('SummonThink')
-- co player powie gdy przywola: creature:say("Go " .. summonName .. "!", TALKTYPE_MONSTER_SAY)
else
creature:sendCancelMessage("Demon is already summoned.")-- error msg
end
if summonscountFuriousTroll == 0 then
local summonx = Game.createMonster(summonNamex, creaturePosition)
summonx:setMaster(creature)
summonx:setDropLoot(false)
summonx:registerEvent('SummonThink')
else
creature:sendCancelMessage("Furious Troll is already summoned.")-- error msg
end
return true
end
spell:name("duo support")
spell:words("conjure duo")
spell:group("support")
spell:vocation("druid;true", "elder druid;true", "paladin;true", "royal paladin;true", "sorcerer;true",
"master sorcerer;true","knight;true","elite knight;true")
spell:id(1211)
spell:cooldown(1000)
spell:groupCooldown(1000)
spell:level(20)
spell:mana(70)
spell:isAggressive(false)
spell:register()