Ir para conteúdo
  • 0

Pq o Erro (luaGetThingPosition) Thing not found Ná spell?


Mattziin

Pergunta

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.

[29/01/2013 11:59:57] [Error - Spell Interface]
[29/01/2013 11:59:57] In a timer event called from:
[29/01/2013 11:59:57] data/spells/scripts/sakura/taihoukyakunojutsu.lua:onCastSpell
[29/01/2013 11:59:57] Description:
[29/01/2013 11:59:57] (luaGetThingPosition) Thing not found

[29/01/2013 11:59:57] [Error - Spell Interface]
[29/01/2013 11:59:57] In a timer event called from:
[29/01/2013 11:59:57] data/spells/scripts/sakura/taihoukyakunojutsu.lua:onCastSpell
[29/01/2013 11:59:57] Description:
[29/01/2013 11:59:57] data/spells/scripts/sakura/taihoukyakunojutsu.lua:140: attempt to index a boolean value
[29/01/2013 11:59:57] stack traceback:
[29/01/2013 11:59:57] 	data/spells/scripts/sakura/taihoukyakunojutsu.lua:140: in function

 

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

  • 0
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
end

Link para o comentário
Compartilhar em outros sites

  • 0

se o dele /\ n funcionar tenta assim...

 

local 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

local function getHit2(cid)
local hit2 = getPlayerLevel(cid)*5 + getPlayerMagLevel(cid)*5 + math.random(20650,29750)
return hit2
end

local 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

local 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


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 isCreature(target) 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
end
return true
end

 

Link para o comentário
Compartilhar em outros sites

  • 0

olha o erro q dá agora.

 


[29/01/2013 14:54:06] [Error - Spell Interface] 
[29/01/2013 14:54:06] data/spells/scripts/sakura/taihoukyakunojutsu.lua:onCastSpell
[29/01/2013 14:54:06] Description: 
[29/01/2013 14:54:07] attempt to index a nil value
[29/01/2013 14:54:07] stack traceback:
[29/01/2013 14:54:07]  [C]: in function 'getTileInfo'
[29/01/2013 14:54:07]  data/lib/050-function.lua:327: in function 'getTilePzInfo'
[29/01/2013 14:54:07]  data/spells/scripts/sakura/taihoukyakunojutsu.lua:45: in function <data/spells/scripts/sakura/taihoukyakunojutsu.lua:14>

Link para o comentário
Compartilhar em outros sites

  • 0

eu usei o do "artigo" aparece o nome da spell e talz. mais nao sai effect e nem hita.

 

 

 

e o teu "Slicer" nao funciona e dá esse erro \/

[29/01/2013 15:27:39] [Error - Spell Interface]
[29/01/2013 15:27:39] data/spells/scripts/sakura/taihoukyakunojutsu.lua:onCastSpell
[29/01/2013 15:27:39] Description:
[29/01/2013 15:27:39] attempt to index a nil value
[29/01/2013 15:27:39] stack traceback:
[29/01/2013 15:27:39]  [C]: in function 'getTileInfo'
[29/01/2013 15:27:39]  data/lib/050-function.lua:327: in function 'getTilePzInfo'
[29/01/2013 15:27:39]  data/spells/scripts/sakura/taihoukyakunojutsu.lua:100: in function <data/spells/scripts/sakura/taihoukyakunojutsu.lua:67>

.

 

 

 

 

Slicer eu peguei isso da net, nem me lembro aonde q foi ..

 

 

 

~~~ ~~~~ ~EDITED ~~ ~~~ ~~~

Pode fechar, eu peguei outra spell e botei o effect dessa ... Vlw ai por tentarem me ajudar. DÚVIDA SANADA.

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

×
×
  • Criar Novo...