-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.
-
Conteúdo Similar
-
script alguém pode me ajudar nessa spells aqui, queira que colocassem pro meu personagem ficar inatingível por 6 segundos e podendo atacar livremente
Por lazaroszz,
- 0 respostas
- 475 visualizações
-
- 0 respostas
- 901 visualizações
-
- 0 respostas
- 1930 visualizações
-
- 1 resposta
- 2221 visualizações
-
- 0 respostas
- 1058 visualizações
-
Pergunta
Mattziin 12
Gostaria de saber pq a spell ta dando o erro. Eu olhei o script varias vezes e nao achei o erro :S , Alguém me ajuda ai.
script \/
local quant_hit = 6 -- quantidade de hit's que ira dar no target
local timeHit = 0.5 -- segundos de diferença para cada hit
local quant_sqm = 2 -- sqms que ira empurrar o target
local sqmTime = 0.01 -- segundos para empurrar após hitar, exemplo de meio segundo.
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatFormula(combat, COMBAT_FORMULA_SKILL, 60, 0, 1, 0)
local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, -1)
setConditionParam(condition, CONDITION_PARAM_SPEED, 10)
setConditionFormula(condition, 0, 0, 0, 0)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
local target = getCreatureTarget(cid)
if target > 0 then
local position_target = nil
local cont = 0
for i=-1, 1 do
for j=-1,1 do
position_target = {x=getCreaturePosition(target).x+i, y=getCreaturePosition(target).y+j, z=getCreaturePosition(target).z}
if isWalkable(position_target) then
cont = cont+1
break
end
end
if cont > 0 then
break
end
position_target = nil
end
local px = math.random(-1,1)
local py = 0
if px == -1 or px == 1 then
py = 0
elseif px == 0 then
local n = {1,-1}
py = n[math.random(1,#n)]
end
local poscentral = {x=getCreaturePosition(target).x+px, y=getCreaturePosition(target).y+py, z=getCreaturePosition(target).z}
if isWalkable(poscentral) then
position_target = poscentral
end
if getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(target)) 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
function hitTarget2(cid, target)
if isCreature(target) and isPlayer(cid) then
local effect2 = 1 -- efeito do hit na creatura.
doAddCondition(target, condition)
doTargetCombatHealth(cid, target, COMBAT_PHYSICALDAMAGE, -getHit2(cid), -getHit2(cid), effect2)
end
end
function getHit2(cid)
local hit2 = getPlayerLevel(cid)*5 + getPlayerMagLevel(cid)*5 + math.random(20650,29750)
return hit2
end
function empurrarTarget(cid, target, tempo)
if isPlayer(cid) then
doRemoveCondition(cid, CONDITION_PARALYZE)
end
if isCreature(target) and isPlayer(cid) then
local positions = nil
doAddCondition(target, condition)
if getPlayerLookDir(cid) == 0 then
positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y-1, z=getCreaturePosition(target).z}
elseif getPlayerLookDir(cid) == 1 then
positions = {x=getCreaturePosition(target).x+1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z}
elseif getPlayerLookDir(cid) == 2 then
positions = {x=getCreaturePosition(target).x, y=getCreaturePosition(target).y+1, z=getCreaturePosition(target).z}
elseif getPlayerLookDir(cid) == 3 then
positions = {x=getCreaturePosition(target).x-1, y=getCreaturePosition(target).y, z=getCreaturePosition(target).z}
end
if positions ~= nil and isWalkable(positions) then
doTeleportThing(target, positions)
end
local tp = sqmTime*1000*(quant_sqm-1)+quant_hit*timeHit*1000
if tempo == tp then
doRemoveCondition(target, CONDITION_PARALYZE)
end
end
end
function sendEffect2(cid, target)
local position1 = {x=getCreaturePosition(cid).x, y=getCreaturePosition(cid).y, z=getCreaturePosition(cid).z}
local position2 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
if isCreature(target) and isPlayer(cid) then
doSendMagicEffect(position1, 190)
doSendMagicEffect(position2, 197)
end
end
Thank
Link para o comentário
Compartilhar em outros sites
7 respostass a esta questão
Posts Recomendados