CL

[Pedido]Mana Burn E Mimic Spell

Por clowdleo1, 03 de mai. de 2012 em Scripts

script
9
1.6k
clowdleo1C
03 de maio de 2012 às 00:58

Versão:8.54

OT: TFS 0.3.6

 

 

 

Preciso de um script que se o player for da vocação denominada "x" quando ele tirar life do player com melee ele tire mana tambem.

 

 

e uma spell em area linear como o exori vis lux

 

1

1

1

1

0

 

que os player atingidos nao possam se mover e todos movimentos que o player que uso a magia faça ele tera que fazer tambem!

 

Exemplo:

 

o player foi atingido,eu andei 1 sqm pra cima ele deve andar 1 sqm pra cima tambem por "X" segundos.

Lucaswc15L
03 de maio de 2012 às 08:55

Script interessante, se alguem souber fazer ajuda ae tem meu Rep+ tmb.

VincV
03 de maio de 2012 às 10:10

too easy

tenta assim

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_ENERGYHIT)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 2.5, 4)

local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_MANADRAIN)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 255)
setAttackFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 2.5, 4)

local area = createCombatArea(AREA_BEAM5, AREADIAGONAL_BEAM5)
setCombatArea(combat, area)
setCombatArea(combat1, area)

function onCastSpell(cid, var)

doCombat(cid, combat, var)
addEvent(doCombat, 1,cid, combat, var)

return true

end

Lucaswc15L
03 de maio de 2012 às 11:53

To falando do segundo script que ele disse que 1 player anda pro lado o outro tb.

clowdleo1C
03 de maio de 2012 às 17:51

não era bem isso que eu queria dahaka...

eu queria um tipo de habilidade "passiva" nao importa em quem se a classe X tirar dano melee seja com espada,club,fist arranque-se um numero de mana.

jhon992J
04 de maio de 2012 às 10:18

Mimic Spell:

function onCastSpell(cid, var)
local tempo = 30 -- tempo em segundos que vai durar o controle.
local target = getCreatureTarget(cid)
local position = getPlayerPosition(cid)
doCreatureSetNoMove(target, true)
setPlayerStorageValue(cid, 5421, os.time()+tempo)
movePlayer(position, target, cid)
return true
end

function movePlayer(position, target, cid)
if isCreature(target) and isPlayer(cid) then
   local pos = getCreaturePosition(target)
   if getPlayerPosition(cid).x ~= position.x then
       pos = {x = getCreaturePosition(target).x+(getPlayerPosition(cid).x +(- 1 * position.x)), y = getCreaturePosition(target).y, z = getCreaturePosition(target).z}
   elseif getPlayerPosition(cid).y ~= position.y then    
       pos = {x = getCreaturePosition(target).x, y = getCreaturePosition(target).y+(getPlayerPosition(cid).y +(- 1 * position.y)), z = getCreaturePosition(target).z}
   end
   if isWalkable(pos) then
       doTeleportThing(target, pos)
   end
   if (getPlayerStorageValue(cid, 5421) - os.time()) > 0 then
       addEvent(movePlayer, 100, getPlayerPosition(cid), target, cid)
   else
       doPlayerSendTextMessage(cid, 22, "Você perdeu o controle.")
       doCreatureSetNoMove(target, false)
   end
end
end

function isWalkable(pos, creature, pz, proj) -- nord
   if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
   local creature = getTopCreature(pos)
   if creature.type > 0 then    return false end
   if getTilePzInfo(pos) and not pz then return false end
   local n = not proj and 3 or 2
   for i = 0, 255 do
    pos.stackpos = i
    local tile = getTileThingByPos(pos)
    if tile.itemid ~= 0 and not isCreature(tile.uid) then
	    if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
		    return false
	    end
    end
   end
return true
end

JeanCristianJ
04 de maio de 2012 às 14:46

eeee jhon sempre na frente rep + eu perguntei de um script de spell legal no msn e vc disse que nao sabia ¬¬

VodkartV
04 de maio de 2012 às 14:52

o primeiro pedido é o mais fácil, só fazer pelo onStats

clowdleo1C
06 de maio de 2012 às 15:38

REP++ Jhon,unico problema é que os monstros conseguem se mover,mais eles imitam o movimento se eu andar tambem.