Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local combat = Combat()
- combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE)
- combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS)
- combat:setArea(createCombatArea(AREA_CROSS1X1))
- local maxsummons = 1
- function onCastSpell(creature, variant)
- local summoncount = creature:getSummons()
- local newlife = getPlayerMagLevel(cid) + getPlayerLevel(cid)
- local maxlife = getCreatureMaxHealth(summon)+ newlife
- setCreatureMaxHealth(summon,maxlife)
- doCreatureAddHealth(summon,maxlife)
- local pos = creature:getPosition()
- if #summoncount < maxsummons then
- for i = 1, maxsummons - #summoncount do
- local summon = Game.createMonster("Flame Totem", pos)
- if summon then
- summon:setMaster(creature)
- end
- end
- end
- creature:say("Watch my Totem!", TALKTYPE_MONSTER_SAY)
- return combat:execute(creature, variant)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement