Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. local combat = Combat()
  2. combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_NONE)
  3. combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_SMALLPLANTS)
  4. combat:setArea(createCombatArea(AREA_CROSS1X1))
  5.  
  6. local maxsummons = 1
  7.  
  8. function onCastSpell(creature, variant)
  9. local summoncount = creature:getSummons()
  10. local newlife = getPlayerMagLevel(cid) + getPlayerLevel(cid)
  11. local maxlife = getCreatureMaxHealth(summon)+ newlife
  12. setCreatureMaxHealth(summon,maxlife)
  13. doCreatureAddHealth(summon,maxlife) 
  14. local pos = creature:getPosition()
  15. if #summoncount < maxsummons then
  16. for i = 1, maxsummons - #summoncount do
  17. local summon = Game.createMonster("Flame Totem", pos)
  18. if summon then
  19. summon:setMaster(creature)
  20. end
  21. end
  22. end
  23. creature:say("Watch my Totem!", TALKTYPE_MONSTER_SAY)
  24. return combat:execute(creature, variant)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement