NY

~> Spell <~

Por nyuchiha, 28 de jul. de 2011 em Globalevents e Spells

script
8
2.5k
nyuchihaN
28 de julho de 2011 às 19:33

Uma spell bem simples, + pra quem n sabe como fazer oque fiz abaixo, ja fica como um tutorial.

Spells/Script crie 1 arquivo LUA chamado Elementsforce e adicione isso dentro:

local combat = createCombatObject()  
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) 
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE) 
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, FALSE) 
setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) 
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 8.335, 0, 8.58, 0) 

local Holyarea = createCombatArea{ 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0}, 
} 
local effect1 = createCombatArea{ 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0}, 
{0, 0, 0, 0, 0, 0, 0, 0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               local function elements1(params) 
               doSendDistanceShoot({x=getThingPos(cid).x+3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, {x=getThingPos(cid).x+3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, CONST_ANI_ICE) 
               doAreaCombatHealth(getThingPos(cid), COMBAT_ICEDAMAGE, getThingPos(cid), effect1, -(0), -(0), CONST_ME_ICEATTACK) 
               mayNotMove(cid, 1) 
       end 
               local function elements2(params) 
               doSendAnimatedText({x=getThingPos(cid).x+3, y=getThingPos(cid).y-3, z=getThingPos(cid).z},"ICE",TEXTCOLOR_BLUE) 
               doSendDistanceShoot({x=getThingPos(cid).x+3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, {x=getThingPos(cid).x-3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, CONST_ANI_ENERGYBALL) 
               doAreaCombatHealth(getThingPos(cid), COMBAT_ENERGYDAMAGE, getThingPos(cid), effect2, -(0), -(0), CONST_ME_ENERGYHIT) 
       end 
               local function elements3(params) 
               doSendAnimatedText({x=getThingPos(cid).x-3, y=getThingPos(cid).y-3, z=getThingPos(cid).z},"ENERGY",TEXTCOLOR_PURPLE) 
               doSendDistanceShoot({x=getThingPos(cid).x-3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, {x=getThingPos(cid).x-3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, CONST_ANI_FIRE) 
               doAreaCombatHealth(getThingPos(cid), COMBAT_FIREDAMAGE, getThingPos(cid), effect3, -(0), -(0), CONST_ME_FIREATTACK) 
       end 
               local function elements4(params) 
               doSendAnimatedText({x=getThingPos(cid).x-3, y=getThingPos(cid).y+3, z=getThingPos(cid).z},"FIRE",TEXTCOLOR_RED) 
               doSendDistanceShoot({x=getThingPos(cid).x-3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, {x=getThingPos(cid).x+3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, CONST_ANI_EARTH) 
               doAreaCombatHealth(getThingPos(cid), COMBAT_EARTHDAMAGE, getThingPos(cid), effect4, -(0), -(0), CONST_ME_SMALLPLANTS) 
       end 
               local function elements5(params) 
               doSendDistanceShoot({x=getThingPos(cid).x+3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, getThingPos(cid), CONST_ANI_EARTH) 
               doSendDistanceShoot({x=getThingPos(cid).x+3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, getThingPos(cid), CONST_ANI_ICE) 
               doSendDistanceShoot({x=getThingPos(cid).x-3, y=getThingPos(cid).y+3, z=getThingPos(cid).z}, getThingPos(cid), CONST_ANI_FIRE) 
               doSendDistanceShoot({x=getThingPos(cid).x-3, y=getThingPos(cid).y-3, z=getThingPos(cid).z}, getThingPos(cid), CONST_ANI_ENERGYBALL) 
       end 
               local function elements6(params) 
               doAreaCombatHealth(getThingPos(cid), holy, getThingPos(cid), Holyarea, -(0), -(0), CONST_ME_HOLYAREA) 
               doSendDistanceShoot(getThingPos(cid), {x=getThingPos(cid).x+5, y=getThingPos(cid).y, z=getThingPos(cid).z}, CONST_ANI_ICE) 
               doSendDistanceShoot(getThingPos(cid), {x=getThingPos(cid).x-5, y=getThingPos(cid).y, z=getThingPos(cid).z}, CONST_ANI_ENERGYBALL) 
               doSendDistanceShoot(getThingPos(cid), {x=getThingPos(cid).x, y=getThingPos(cid).y+5, z=getThingPos(cid).z}, CONST_ANI_FIRE) 
               doSendDistanceShoot(getThingPos(cid), {x=getThingPos(cid).x, y=getThingPos(cid).y-5, z=getThingPos(cid).z}, CONST_ANI_EARTH) 
               mayNotMove(cid, 0) 
       end 
               local function elements7(params) 
               doSendAnimatedText({x=getThingPos(cid).x+3, y=getThingPos(cid).y+3, z=getThingPos(cid).z},"EARTH",TEXTCOLOR_GREEN) 
       end 
       addEvent(doCombat, 1600, cid, combat, var) 
       addEvent(elements1, 000, parameters) 
       addEvent(elements2, 300, parameters)
       addEvent(elements3, 600, parameters) 
       addEvent(elements4, 900, parameters) 
       addEvent(elements5, 1300, parameters) 
       addEvent(elements6, 1600, parameters) 
       addEvent(elements7, 1200, parameters) 
end

Agora em Spells.xml adicione :

        <instant name="Elements Force" words="utito confuri" lvl="300" mana="120" exhaustion="2500" needlearn="0" script="Elementsforce.lua"> 
               <vocation name="Sorcerer"/> 
               <vocation name="Master Sorcerer"/> 
               <vocation name="Druid"/> 
               <vocation name="Elder Druid"/> 
       </instant>

Tambem serve de exemplo para fazer spells com o DistanceShoots saindo de outros lugares.

Com uma pouco de criatividade da pra fazer umas spells bem legais e fora do comum.



Editado Setembro 13 por DeathAngels

28 de julho de 2011 às 19:40

Parabens, eu testei no meu ot e funfo, continue assim postando mas e mas spells. + REP

nyuchihaN
01 de agosto de 2011 às 14:03

Pronto , baixei um Ot de Tibia e arrumei ela, adicionei + umas coisinhas soh pra enfeitar.

 

Vlw pelo comentário =)

4 semanas depois...
25 de agosto de 2011 às 22:01

Foto ? ! :weight_lift:

1 mês depois...
FrozenGamesF
10 de setembro de 2011 às 18:47

PRINTS ;/ ??

sayrussanS
12 de setembro de 2011 às 22:42

Taca uma print ae pra ve

nyuchihaN
13 de setembro de 2011 às 00:14

Coloquei um Videozinho. =)

2 semanas depois...
DevilMoonD
22 de setembro de 2011 às 23:54

Muito bom

Editado Setembro 22 por DevilMoon