Ir para conteúdo

Transformação Animal.


vini996

Posts Recomendados

Servidor testado: TFS 0.3.1

 

Bem eu vou ensinar logo como se instala e instalar logo para depois eu explicar.

 

Vá ate spells.xml e adcione essas tags:

 

<instant name="Transformation Bear" words="utamo anima bear" lvl="34" mana="0" aggressive="0" exhaustion="1500" needlearn="0" script="druidbear.lua">

<vocation name="Druid"/>

<vocation name="Elder Druid"/>

 

</instant>

<instant name="Transformation tiger" words="utamo anima tiger" lvl="34" mana="0" aggressive="0" exhaustion="1500" needlearn="0" script="druidtiger.lua">

<vocation name="Druid"/>

<vocation name="Elder Druid"/>

</instant>

<instant name="Transformation elephant" words="utamo anima elephant" lvl="34" mana="0" aggressive="0" exhaustion="1500" needlearn="0" script="druidele.lua">

<vocation name="Druid"/>

<vocation name="Elder Druid"/>

</instant>

Scripts em lua

 

Druidbear.lua

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition2 = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition2, CONDITION_PARAM_SUBID, 2)

setConditionParam(condition2, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition2, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition2, CONDITION_PARAM_HEALTHGAIN, 25)

setConditionParam(condition2, CONDITION_PARAM_HEALTHTICKS, 1500)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition3 = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition3, CONDITION_PARAM_SUBID, 3)

setConditionParam(condition3, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition3, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition3, CONDITION_PARAM_STAT_MAGICLEVEL, 2)

 

function onCastSpell(cid, var,param)

pos = getCreaturePosition(cid)

 

local mana = (400)

if(getCreatureMana(cid) < mana) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)

doSendMagicEffect(pos, CONST_ME_POFF)

return LUA_ERROR

end

if(doCombat(cid, combat, var) ~= LUA_NO_ERROR) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)

doSendMagicEffect(pos, CONST_ME_POFF)

 

return LUA_ERROR

end

doSetCreatureOutfit(cid,{lookType = 16, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},2 * 60 * 1000)

doAddCondition(cid, condition)

if param == bixos[1] then

end

doAddCondition(cid, condition2)

doAddCondition(cid, condition3)

doCreatureAddMana(cid, -mana, FALSE)

doPlayerAddSpentMana(cid, mana)

return LUA_NO_ERROR

end

 

Druidtiger.lua

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -100)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition2 = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition2, CONDITION_PARAM_SUBID, 2)

setConditionParam(condition2, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition2, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition2, CONDITION_PARAM_HEALTHGAIN, 1)

setConditionParam(condition2, CONDITION_PARAM_HEALTHTICKS, 1500)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition3 = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition3, CONDITION_PARAM_SUBID, 3)

setConditionParam(condition3, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition3, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition3, CONDITION_PARAM_STAT_MAGICLEVEL, 25)

 

local condition4 = createConditionObject(CONDITION_HASTE)

setConditionParam(condition4, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionFormula(condition4, 1.8, -72, 2.8, -72)

 

 

function onCastSpell(cid, var,param)

pos = getCreaturePosition(cid)

 

local mana = (400)

if(getCreatureMana(cid) < mana) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)

doSendMagicEffect(pos, CONST_ME_POFF)

return LUA_ERROR

end

if(doCombat(cid, combat, var) ~= LUA_NO_ERROR) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)

doSendMagicEffect(pos, CONST_ME_POFF)

 

return LUA_ERROR

end

doSetCreatureOutfit(cid,{lookType = 125, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},2 * 60 * 1000)

doAddCondition(cid, condition)

doAddCondition(cid, condition2)

doAddCondition(cid, condition3)

doAddCondition(cid, condition4)

doCreatureAddMana(cid, -mana, FALSE)

doPlayerAddSpentMana(cid, mana)

return LUA_NO_ERROR

end

Druidele.lua

 

local combat = createCombatObject()

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition, CONDITION_PARAM_SUBID, 1)

setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, 30)

 

local combat2 = createCombatObject()

setCombatParam(combat2, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat2, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition2 = createConditionObject(CONDITION_REGENERATION)

setConditionParam(condition2, CONDITION_PARAM_SUBID, 2)

setConditionParam(condition2, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition2, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition2, CONDITION_PARAM_HEALTHGAIN, 1)

setConditionParam(condition2, CONDITION_PARAM_HEALTHTICKS, 1500)

 

local combat3 = createCombatObject()

setCombatParam(combat3, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)

setCombatParam(combat3, COMBAT_PARAM_AGGRESSIVE, FALSE)

 

local condition3 = createConditionObject(CONDITION_ATTRIBUTES)

setConditionParam(condition3, CONDITION_PARAM_SUBID, 3)

setConditionParam(condition3, CONDITION_PARAM_BUFF, TRUE)

setConditionParam(condition3, CONDITION_PARAM_TICKS, 2 * 60 * 1000)

setConditionParam(condition3, CONDITION_PARAM_STAT_MAGICLEVEL, -10)

 

function onCastSpell(cid, var,param)

pos = getCreaturePosition(cid)

 

local mana = (400)

if(getCreatureMana(cid) < mana) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHMANA)

doSendMagicEffect(pos, CONST_ME_POFF)

return LUA_ERROR

end

if(doCombat(cid, combat, var) ~= LUA_NO_ERROR) then

doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)

doSendMagicEffect(pos, CONST_ME_POFF)

 

return LUA_ERROR

end

doSetCreatureOutfit(cid,{lookType = 211, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet, lookAddons = getCreatureOutfit(cid).lookAddons},2 * 60 * 1000)

doAddCondition(cid, condition)

doAddCondition(cid, condition2)

doAddCondition(cid, condition3)

doCreatureAddMana(cid, -mana, FALSE)

doPlayerAddSpentMana(cid, mana)

return LUA_NO_ERROR

end

 

 

Agora posso explicar

 

 

Bem, o script é o seguinte, você fala poe exemplo utamo anima bear, e você se transforma em um urso por um periodo de tempo gastando 400 de mana, e nisso perdendo 10 skills de shiend, sua regeneração de HP aumentada e seu ML em +2.

Caso fale utamo anima tiger você: fica com 0 de shielding mais seu ML é aumentado em 25

Caso use o modo elefante o ML dece em 10 pontos e o shield sobe em 20 pontos.

Eu privei o usso de SS nesse topico pois nao vejo por que postar foto. apenas para deichar o topico maior? A nescessidade de SS nao existe pois seria a mesma coisa de se usar utevo res ina so que você ganha status

 

Creditos: Mock

Editado por vini96
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...