[CreatureEvents] [mod] Refletor De Danos

Henrique Moura
em Globalevents e Spells
  • 1
  • 2

Henrique Moura

Ex-administrador
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 17/02/08Posts: 2541

Mod Reflect by IRockstar

 

Isso é uma modificação que funciona da seguinte forma:

Você coloca o phoenix shield em alguma das mãos, e fala a magia, ele será encantado por algum tempo e todo o dano recebido irá voltar para quem te atacou. Porém os monstros não darão experience.

 

Em /mods/phoenix_shield.xml coloque:

<?xml version="1.0" encoding="UTF-8"?>
<mod name="Phoenix magic shield" version="1.0" author="William Christopher" contact="" enabled="yes">
<description>
	Phoenix shield script .-.
</description>

<config name="config"><![CDATA[
	local storage_value = 45605
	local item_id = 6539
	local hit_amount = 25
]]></config>
	<event type="login" name="phoenixLogin" event="script"><![CDATA[
	function onLogin(cid)
		registerCreatureEvent(cid,"phoenixShield")
		return true
	end
	]]></event>

<event type="statschange" name="phoenixShield" event="script"><![CDATA[
	domodlib("config")
	function onStatsChange(cid, attacker, type, combat, value)
		if type == STATSCHANGE_HEALTHGAIN then
			if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == item_id then
				if getPlayerStorageValue(cid, storage_value) >= 1 then
					doCreatureAddHealth(attacker, - value)
					doPlayerSetStorageValue(cid, storage_value, getPlayerStorageValue(cid, storage_value)-1)
					doSendMagicEffect(getThingPos(attacker), CONST_ME_DRAWBLOOD)
					doSendAnimatedText(getThingPos(attacker), value, TEXTCOLOR_RED)
					doSendDistanceShoot(getThingPos(cid), getThingPos(attacker), CONST_ANI_ENERGY)
					return false
				end
			else
				return true
			end
		end
		return true
	end
]]></event>
<instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0" event="script">
	<vocation id="1"/>
	<vocation id="2"/>
	<vocation id="3"/>
	<vocation id="4"/><![CDATA[
	function onCastSpell(cid, var)
		if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == item_id then
			if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id then 
				doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid, getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid, 25)
			else
				doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid, getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid, 25)
			end
			for i = 1, 5 do
				addEvent(doSendMagicEffect, i*1000, getThingPos(cid), CONST_ME_MAGIC_BLUE)
			end
			doPlayerSetStorageValue(cid, storage_value, hit_amount)
			addEvent(doSendMagicEffect, 5000, getThingPos(cid), 6)
		else
			doPlayerSendCancel(cid, "You can't enchant anything because you do not have the phoenix shield.")
			doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)
			return false
		end
		return true
	end
]]></instant>

</mod>

Para mudar as vocações que podem utilizar a spell, modifique:

<vocation id="1"/>
<vocation id="2"/>
<vocation id="3"/>
<vocation id="4"/>

 

Você pode mudar tudo aqui:

<instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0">

 

Todos os créditos a IRockstar(dark billie)

KaKilo ~
 


Lom14fD.png

gkaonicx72

avatar
Marquês
Marquês

INFOS

Grupo: MarquêsRegistrado: 16/07/08Posts: 1130Char no Tibia: -

Nossa legal a idéia. Porem isso tem uma duração? Seria bom se você explicasse um pouco mais sobre quanto ela dura, etc. Já que quem não entende muito de scripting vai ter problemas para procurar essa informação. E também explicar qual valores teria que editar para ajustar o script as rates e o PVP do seu server.

 

Duvida?

<instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0"

No final não teria que colocar o ">" para fechar o script?

 

E o titulo do tópico poderia estar no "Center".

Até mais.

Espero ter ajudado.

Atenciosamente, Kaonic

Trabalhando para um futuro melhor do Xtibia - By Kaonic, não use sem colocar os créditos.

Email (não uso como msn): kaonic@xtibia.com

MSN: Envie MP

Mapping Teacher: Koddy

 

Copa XTibia Design - Participante #2 do Grupo A



1277160188-U5886.jpg

 

 

Gifts:



Moskitinho ** -Reji * -Dj Sky * -ShadowDemon** -NightAdams **

rockstar96

Around the world
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 01/07/09Posts: 216
<instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0

 

Continua na outra linha =)

Isto faz o seguinte:

Você equipa um phoenix shield nas mãos, fala utevo gran mas flam, ganha energia o suficiente para refletir 25 batidas para quem te atacou, ou seja, você não toma dano, nem físico, nem mágico, e quem te ataca perde o mesmo de vida que você perderia.

Wiltry

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 03/07/08Posts: 306

:surprised:

Ta de parabéns, otimo script o.O

Eu nunca teria uma idéia dessas, muito criativo :)

Abçs

Atenciosamente,
Wiltry
<div align='center'><b>Wiltry 2008~2009</b></div>
<div align='center'>Mapper & Scripter</div>
<div align='center'><img src="http://img263.imageshack.us/img263/9130/beyond.png" border="0" class="linked-sig-image" /></div>
vlw guww :*

Antiemoxlr

Scripter
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/01/07Posts: 61Char no Tibia: Gaby Slayer

eu Jogo Un ot Que Ten esa spell a 3 anos atraz XDD

Adana Vita

Shield Reflect Que Reflet O Attack +25% So De Mele Id Por 60 Segundoas mas assim Proteje Poco mas ajudda muito

e Adana Vita (Guard) Proteje +5% de Porada :]

rafakings

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 23/11/09Posts: 2Char no Tibia: Toni Ja

Esse primeiro script e a spell??

aonde fika esse mods??

 

aoguem que souber plzz fla

 

 

 

Obrigado

Antiemoxlr

Scripter
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/01/07Posts: 61Char no Tibia: Gaby Slayer

Po se Pode Fazer Um Spell Que reflet dano magico

pq assim eu procuerei ese mods e nao achei :s :unsure:

digomaciel

The PoPs
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 08/12/05Posts: 11

<!--fonto:Old English--><span style="font-family:Old English"><!--/fonto--><!--coloro:#000080--><span style="color:#000080"><!--/coloro--><!--sizeo:4--><span style="font-size:14pt;line-height:100%"><!--/sizeo--><b>Refletor de Danos by IRockstar(Dark Billie)</b><!--sizec--></span><!--/sizec--><!--colorc--></span><!--/colorc--><!--fontc--></span><!--/fontc-->

 

Isso é uma modificação que funciona da seguinte forma:

Você coloca o phoenix shield em alguma das mãos, e fala a magia, ele será encantado por algum tempo e todo o dano recebido irá voltar para quem te atacou. Porém os monstros não darão experience.

 

<b>Em /mods/phoenix_shield.xml coloque:</b>

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?xml version="1.0" encoding="UTF-8"?>

<mod name="Phoenix magic shield" version="1.0" author="William Christopher" contact="" enabled="yes">

<description>

Phoenix shield script .-.

</description>

 

<config name="config"><![CDATA[

local storage_value = 45605

local item_id = 6539

local hit_amount = 25

]]></config>

<event type="login" name="phoenixLogin" event="script"><![CDATA[

function onLogin(cid)

registerCreatureEvent(cid,"phoenixShield")

return true

end

]]></event>

 

<event type="statschange" name="phoenixShield" event="script"><![CDATA[

domodlib("config")

function onStatsChange(cid, attacker, type, combat, value)

if type == STATSCHANGE_HEALTHGAIN then

if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == item_id then

if getPlayerStorageValue(cid, storage_value) >= 1 then

doCreatureAddHealth(attacker, - value)

doPlayerSetStorageValue(cid, storage_value, getPlayerStorageValue(cid, storage_value)-1)

doSendMagicEffect(getThingPos(attacker), CONST_ME_DRAWBLOOD)

doSendAnimatedText(getThingPos(attacker), value, TEXTCOLOR_RED)

doSendDistanceShoot(getThingPos(cid), getThingPos(attacker), CONST_ANI_ENERGY)

return false

end

else

return true

end

end

return true

end

]]></event>

<instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0" event="script">

<vocation id="1"/>

<vocation id="2"/>

<vocation id="3"/>

<vocation id="4"/><![CDATA[

function onCastSpell(cid, var)

if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id or getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid == item_id then

if getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid == item_id then

doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid, getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid, 25)

else

doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid, getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid, 25)

end

for i = 1, 5 do

addEvent(doSendMagicEffect, i*1000, getThingPos(cid), CONST_ME_MAGIC_BLUE)

end

doPlayerSetStorageValue(cid, storage_value, hit_amount)

addEvent(doSendMagicEffect, 5000, getThingPos(cid), 6)

else

doPlayerSendCancel(cid, "You can't enchant anything because you do not have the phoenix shield.")

doSendMagicEffect(getThingPos(cid), CONST_ME_POFF)

return false

end

return true

end

]]></instant>

 

</mod><!--c2--></div><!--ec2-->

 

<b>Para mudar as vocações que podem utilizar a spell, modifique:</b>

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><vocation id="1"/>

<vocation id="2"/>

<vocation id="3"/>

<vocation id="4"/><!--c2--></div><!--ec2-->

 

<b>Colocando os ids certos, bom, você pode mudar tudo aqui:</b>

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><instant name="Phoenix Fury" words="Utevo gran mas flam" lvl="5" manapercent="30" exhaustion="60000" needlearn="0"<!--c2--></div><!--ec2-->

 

 

Todos os créditos a IRockstar(dark billie)

 

--------------------------------------------------------------------

local hit_amount = 25

 

tem como colocar por tempo?? tipo, durante 10 segundos refletir tudo???

33vl0td.gif

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

puts manow ficou mal explicado e mal organizado esse topico.

 

como nao deu pra entender mutio eu copiei tudo e colei no phoenixshield.xml la em MODS.

dae deu Erro Total No Negocio Nao Funfou Nada aqui.

 

explica melhor ou orgazina mais o topico pra eu poder entender um pouco melhor isso.

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

Henrique Moura

Ex-administrador
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 17/02/08Posts: 2541

Eu não sou o criador do script, dessa forma não poderei dar suporte. Pergunte ao criador sobre isso. (iRockstar)

 

Abraços.

KaKilo ~
 


Lom14fD.png

DXtibiaXD

Att: Amem
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/12/09Posts: 57Char no Tibia: Pao Melado

ta ruim o topico to sendo sincero

eu n to conseguindo ¬¬'' dando erro lol arruma aew script mo manero

Msn: Hudson_hen31@hotmail.com

Orkut:

 

Att: Amem

 

 

jasonmraz.png

 

 

 

 

av261799.gif

  • 1
  • 2