AL
pedido

Remover Summon Do Inimigo

Por Allangod, 02 de dez. de 2012 em Scripts

remover
otserv
tibia
5
1.4k
AllangodA
02 de dezembro de 2012 às 10:05

Olá, gostaria de pedir uma spell que tira-se todos os summon do target, eu tenho um server de naruto que o algumas vocation criam clones com mesma outfit,nome,health e etc.. Para uma vocation se defender deles, gostaria dessa spell que destruisse todos os summons do inmigo ou entao uma spell que identifique o player verdadeiro dos summons.

Obs: Esse link: http://www.xtibia.com/forum/topic/197646-spell-remover-summon/

Remove só os meus summons, mas eu nao quero que remova os meus summons, quero que remova os deles (Mas remover só summons, nao os monsters do mapa)

OBG e rep+ pra quem conseguir.

brun123B
02 de dezembro de 2012 às 13:24

Spell que remove os summons que tem o mesmo nome do mestre (precisa estar atacando algum summon dele ou o verdadeiro):

 

function onCastSpell(cid, var)

   local target = getCreatureTarget(cid)

   if not isCreature(target) then doPlayerSendCancel(cid, "You need a target.")
   return false end

   local master = getCreatureMaster(target)

   if not isPlayer(master) then doPlayerSendCancel(cid, "This spell works only against players.")
   return false end

   if #getCreatureSummons(master) > 0 then

    local function doRemoveSummon(creature)
	    if isCreature(creature) then
		    doSendMagicEffect(getThingPos(creature), CONST_ME_POFF)
		    doRemoveCreature(creature)
	    end
    end

    local success = false

    for _, sid in pairs (getCreatureSummons(master)) do
	    if getCreatureName(sid) == getCreatureName(master) then
		    addEvent(doRemoveSummon, _ * 95, sid)
		    success = true
	    end
    end

   end

return success
end

 

Spell que indica a posição do verdadeiro:

 

function onCastSpell(cid, var)

   local target = getCreatureTarget(cid)

   if not isCreature(target) then doPlayerSendCancel(cid, "You need a target.")
   return false end

   local master = getCreatureMaster(target)

   if not isPlayer(master) then doPlayerSendCancel(cid, "This spell works only against players.")
   return false end

   local function revelar(cid, target, times)
    if not isCreature(cid) or not isCreature(target) or times <= 0 then return end
    doSendMagicEffect(getThingPos(target), CONST_ME_TUTORIALSQUARE, cid)
    doSendMagicEffect(getThingPos(target), CONST_ME_TUTORIALARROW, cid)
    addEvent(revelar, 450, cid, target, times - 1)
   end

   revelar(cid, master, 10)

return true
end

AllangodA
02 de dezembro de 2012 às 15:25

Mto obrigado brun123, REP+ pra você vei. Mto bem respondido

fokus090F
02 de dezembro de 2012 às 15:29

Pedido Atendido.

Reportado para Moverem!

 

Abraços !

StigalS
02 de dezembro de 2012 às 16:09

Movido!