Ir para conteúdo

Featured Replies

Postado

Eae Galera do Tibiaking achei Esse System Otimo e Vim Trazer a voces xD Otimo System:

Oq ele é?:

Já jogou The Elder Scrolls V: Skyrim com DLC Dawnguard? Se sim, vai entender com mais facilidade o sistema aqui. Se não, é simples. Imagine você caçando numa cave de vampiros, quando um deles te ataca. Com esse ataque, ele tem 20% de chance (Configurável) de te passar sanguinare vampiris, em outras palavras, vampirismo. Se você contrair, você vira um vampiro de imediato. Ao virar vampiro, você deve se alimentar pelo menos 1 vez a cada 24 horas (Configurável) ou seu nível de vampirismo aumenta. Ao se alimentar, seu nível de vampirismo volta para 1. O nível máximo é 4, e ao atingir o 4, você tem 2 escolhas:

1) Se alimentar e voltar o nível para 1

2) Dizer "vampire lord" e se transformar em Vampire Lord

- OBS: Se transformando em Vampire Lord, ao se alimentar seu nível continua no 4, não volta para 1. Em compensação, você ganha uma outfit.

- Há vantagens e desvantagens em ser vampiro:

Vantagens: Você fica mais resistente ao elemento Death (e fica mais a cada nível de vampirismo) e pode morder monstros para torná-los seus escravos.

Desvantagens: Você fica mais fraco ao elementro Holy (e fica mais a cada nível de vampirismo) e se você quiser, pode colocar um comando que bloqueia os vampiros de usarem certas magias e falarem com NPCs.

- Para se alimentar, você tem 2 modos (Lembrando que se alimentando você volta pra nível 1 de vampirismo):

1) Morder pessoas ou monstros usando o comando "bite". Dê target em alguém ou em algum monstro e fale bite para mordê-lo, tendo 20% de chance (Configurável) de passar vampirismo para a criatura. Se for um monstro, se ele for convinceable, ele pode virar seu escravo.

2) Bebendo uma poção de sangue

- Para se curar do Vampirismo, há um único modo: Bebendo uma poção de cura.

Script:


<?xml version="1.0" encoding="UTF-8"?>

<mod name="Vampire System" version="1.0" author="LuckOake" contact="none" enabled="yes">

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

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

vampwait = 13277

vampstor = 13278

vamplevel = 13279

vamptime = 13280

exha = 10 -- Segundos de exhaustion até poder morder alguém novamente

chance = 10 -- Porcentagem de chance de alguém virar vampiro ao ser mordido

hp = 100 -- Quanto de HP a criatura perderá ao ser mordida

vamphours = 24 -- De quantas em quantas horas a criatura evoluirá de nível de vampirismo caso não se alimente

vampmax = 4 -- Level máximo de vampirismo e level necessário para se transformar num Vampire Lord

vamplordout = 287 -- Outfit do Vampire Lord

weak = 90 -- Porcentagem extra de dano de holy que um vampiro receberá

strenght = 50 -- Porcentagem de resistência do elemento death que um vampiro possui


function isSummon(sid)

	 for i, pid in ipairs(getPlayersOnline()) do

			 for c, cid in pairs(getCreatureSummons(pid)) do

					 if (cid == sid) then

							 return true

					 end

			 end

	 end

	 return false

end


function turnIntoVampire(cid)

	 return setPlayerStorageValue(cid, vampstor, 1) and setVampireLevel(cid, 1)

end


function turnIntoVampireLord(cid)

	 setPlayerStorageValue(cid, vampstor, 2)

	 doSetCreatureOutfit(cid, {lookType = vamplordout}, -1)

end


function cureVampirism(cid)

	 if hasCondition(cid, CONDITION_OUTFIT) then

			 doRemoveCondition(cid, CONDITION_OUTFIT)

	 end

	 return setPlayerStorageValue(cid, vampstor, -1) and setVampireLevel(cid, 0)

end


function isVampire(cid)

	 return getPlayerStorageValue(cid, vampstor) == 1 and true or false

end


function isVampireLord(cid)

	 return getPlayerStorageValue(cid, vampstor) == 2 and true or false

end


function setVampireLevel(cid, level)

	 return setPlayerStorageValue(cid, vamplevel, level)

end


function getVampireLevel(cid)

	 return getPlayerStorageValue(cid, vamplevel)

end

]]></config>

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

<event type="look" name="VampLook" event="script"><![CDATA[

function onLook(cid, thing, position, lookDistance)

domodlib('vamp')

	 if isPlayer(thing.uid) and thing.uid ~= cid and isVampire(thing.uid) or isVampireLord(thing.uid) then

			 doPlayerSetSpecialDescription(thing.uid, ". Vampire Level "..getVampireLevel(thing.uid).."") return true

	 elseif thing.uid == cid and isVampire(cid) or isVampireLord(thing.uid) then

			 doPlayerSetSpecialDescription(cid, ". Vampire Level "..getVampireLevel(cid).."") return true

	 end

return true

end

]]></event>

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

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

function onLogin(cid)

domodlib('vamp')

			 registerCreatureEvent(cid, "VampLook")

			 registerCreatureEvent(cid, "VampThink")

			 registerCreatureEvent(cid, "VampDmg")

	 if isVampireLord(cid) then

			 doSetCreatureOutfit(cid, {lookType = vamplordout}, -1)

	 end

return true

end

]]></event>

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

<event type="combat" name="VampAttack" event="script"><![CDATA[

function onCombat(cid, target)

domodlib('vamp')

	 if isPlayer(target) and not isVampire(target) and not isVampireLord(target) and math.random(1, 100) <= chance then

			 turnIntoVampire(target)

			 doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_ORANGE, "You contracted vampirism.")

			 exhaustion.set(target, vamptime, vamphours*3600)

			 doCreatureAddHealth(target, -hp)

			 doCreatureAddHealth(cid, hp)

			 doSendMagicEffect(getCreaturePos(target), 13)

			 doSendMagicEffect(getCreaturePos(cid), 2)

	 end

return true

end

]]></event>

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

<talkaction words="bite" event="buffer"><![CDATA[

domodlib('vamp')

	 local r = math.random(1, 100)

	 local target = getCreatureTarget(cid)

	 if not isVampire(cid) and not isVampireLord(cid) then

			 doPlayerSendCancel(cid, "You are not a vampire.") return true

	 elseif getCreatureTarget(cid) < 1 then

			 doPlayerSendCancel(cid, "You must have a target.") return true

	 elseif exhaustion.check(cid, vampwait) then

			 doPlayerSendCancel(cid, "Wait "..exhaustion.get(cid, vampwait).." seconds to bite someone again.") return true

	 elseif getDistanceBetween(getCreaturePos(cid), getCreaturePos(target)) > 1 then

			 doPlayerSendCancel(cid, "Get close to your target.") return true

	 elseif isSummon(target) then

			 doPlayerSendCancel(cid, "Sorry, but you can't bite a summon.") return true

	 elseif isVampire(target) or isVampireLord(target) then

			 doPlayerSendCancel(cid, "Sorry, but this creature is already a vampire.") return true

	 end


	 if isPlayer(target) and r <= chance then

			 turnIntoVampire(target)

			 doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_ORANGE, ""..getCreatureName(cid).." turned you into a vampire.")

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You turned "..getCreatureName(target).." into a vampire.")

			 exhaustion.set(target, vamptime, vamphours*3600)

	 elseif isMonster(target) and r <= chance and (getMonsterInfo(getCreatureName(target)).convinceable) then

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You turned "..getCreatureName(target).." into a vampire and now it's your thrall.")

			 doConvinceCreature(cid, target)

	 end

			 doSendAnimatedText(getCreaturePos(target), "-"..hp, TEXTCOLOR_RED)

			 doCreatureAddHealth(target, -hp)

			 doCreatureAddHealth(cid, hp)

	 if not isVampireLord(cid) then

			 setVampireLevel(cid, 1)

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your vampirism level regressed to 1.")

			 exhaustion.set(cid, vamptime, vamphours*3600)

	 end

			 doSendMagicEffect(getCreaturePos(target), 13)

			 doSendMagicEffect(getCreaturePos(cid), 2)

			 exhaustion.set(cid, vampwait, exha)

return true

]]></talkaction>

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

<event type="think" name="VampThink" event="script"><![CDATA[

function onThink(cid)

domodlib('vamp')

	 if isVampire(cid) and not exhaustion.check(cid, vamptime) and getVampireLevel(cid) < 4 then

			 exhaustion.set(cid, vamptime, vamphours*3600)

			 setVampireLevel(cid, getVampireLevel(cid)+1)

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your vampirism evolved to level "..getVampireLevel(cid).." because you didn't feed.")

	 end

return true

end

]]></event>

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

<talkaction words="vampire lord" filter="word-spaced" event="buffer"><![CDATA[

domodlib('vamp')

	 if not isVampire(cid) then

			 doPlayerSendCancel(cid, "You are not a vampire.") return true

	 elseif getVampireLevel(cid) < vampmax then

			 doPlayerSendCancel(cid, "You must be a vampire level "..vampmax.." to transform into a Vampire Lord.") return true

	 elseif isVampireLord(cid) then

			 doPlayerSendCancel(cid, "You are already a Vampire Lord.") return true

	 end


			 doSendMagicEffect(getCreaturePos(cid), 40)

			 turnIntoVampireLord(cid)

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You are now a Vampire Lord!")

return true

]]></talkaction>

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

<action itemid="6311" event="script"><![CDATA[

domodlib('vamp')

	 if itemEx.uid ~= cid then

			 doPlayerSendCancel(cid, "You may only use this potion on yourself.") return true

	 elseif not isVampire(cid) and not isVampireLord(cid) then

			 doPlayerSendCancel(cid, "You aren't a vampire.") return true

	 end


			 doSendMagicEffect(getCreaturePos(cid), 12)

			 cureVampirism(cid)

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your vampirism was cured.")

			 doCreatureSay(cid, "Aaaah...", TALKTYPE_MONSTER)

			 doRemoveItem(item.uid, 1)

return true

]]></action>

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

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

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

domodlib('vamp')

	 ndmg = math.ceil(value*(weak/100)+(getVampireLevel(cid)*20))

	 pdmg = math.ceil(value*(strenght/100)+(getVampireLevel(cid)*20))

	 if type == STATSCHANGE_HEALTHLOSS and isVampire(cid) or isVampireLord(cid) then

			 if combat == COMBAT_HOLYDAMAGE then

					 doCreatureAddHealth(cid, -ndmg)

					 doSendAnimatedText(getCreaturePos(cid), "-"..ndmg, TEXTCOLOR_YELLOW)

			 elseif combat == COMBAT_DEATHDAMAGE then

					 doCreatureAddHealth(cid, pdmg)

			 end

	 end

return true

end

]]></event>

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

<action itemid="6312" event="script"><![CDATA[

domodlib('vamp')

	 if itemEx.uid ~= cid then

			 doPlayerSendCancel(cid, "You may only use this potion on yourself.") return true

	 elseif not isVampire(cid) and not isVampireLord(cid) then

			 doPlayerSendCancel(cid, "You aren't a vampire.") return true

	 end


			 setVampireLevel(cid, 1)

			 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your vampirism level regressed to 1.")

			 doSendMagicEffect(getCreaturePos(cid), 13)

			 exhaustion.set(cid, vamptime, vamphours*3600)

			 doCreatureSay(cid, "Aaaah...", TALKTYPE_MONSTER)

			 doRemoveItem(item.uid, 1)

return true

]]></action>

</mod>

Instalando (importantíssimo):
1) Como a maioria sabe, adicione um arquivo XML na pasta MODs e coloque o script acima dentro. 2) Na pasta monsters, adicione isso no monstro Vampire antes de </monster>:


<script>

<event name="VampAttack"/>

</script>

3) Caso queira que Vampiros sejam incapacitados de usar alguma Spell, coloque esse código uma linha abaixo de onCastSpell:


if getPlayerStorageValue(cid, 13278) >= 1 then

doPlayerSendCancel(cid, "You can't use this spell because you are a vampire.") return false

end[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]
Configurando:
Você configura aqui:

exha = 10 -- Segundos de exhaustion até poder morder alguém novamente

chance = 10 -- Porcentagem de chance de alguém virar vampiro ao ser mordido

hp = 100 -- Quanto de HP a criatura perderá ao ser mordida

vamphours = 24 -- De quantas em quantas horas a criatura evoluirá de nível de vampirismo caso não se alimente

vampmax = 4 -- Level máximo de vampirismo e level necessário para se transformar num Vampire Lord

vamplordout = 287 -- Outfit do Vampire Lord

weak = 90 -- Porcentagem extra de dano de holy que um vampiro receberá

strenght = 50 -- Porcentagem de resistência do elemento death que um vampiro possui

Aqui:

<action itemid="6311" event="script"><![CDATA[

No lugar de 6311 você coloca o ID da sua poção de cura de vampirismo

E aqui:

<action itemid="6312" event="script"><![CDATA[

No lugar de 6312 você coloca o ID da sua poção de sangue

Imagems:

vampo.png

vamp2d.png

vamp3.png

Observações:

- O MOD pode conflitar caso você use algum REP System ou Frag System que use onLook.

Créditos:

LuckOake -- Pelo sistema

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

  • Respostas 5
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

Mano Se è MOD Pq Vc Postou Aqui? Nessa Senção? Fique Mais Atento Da Proxima Vez !

Reportado Para Moverem Para Area Correta !

Postado
  • Autor

Manow Num achei a area Correta :/ da um desconto ai né

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

Postado
  • Autor

Vlw ai madaras xD

Meu Ultimo projeto em desenvolvimento!

 

http://www.tibiaking.com/forum/topic/47753-show-off-ultimo-projeto-para-download/

 

 

Grupo do facebook para OtServidores! (Divulgação + Criação de Equipe)

 

https://www.facebook.com/groups/otservidores/

 

Visitante
Este tópico está impedido de receber novos posts.

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo