Ir para conteúdo

Featured Replies

Postado

Erros

[17:1:31.504] [Warning - Spells::registerEvent] Duplicate registered instant spell with words: Katon dragon furie
[17:1:31.884] [Warning - Spells::registerEvent] Duplicate registered instant spell with words: Explosion Katon
[17:1:31.887] [Warning - Spells::registerEvent] Duplicate registered instant spell with words: Explosion Katon
script

...



[16:37:56.078] [Error - Spell Interface]
[16:37:56.084] data/spells/scripts/Kakashi/kamui me.lua:onCastSpell
[16:37:56.086] Description:
[16:37:56.094] (luaDoCreateTeleport) Tile not found

[16:25:09.147] [Error - Spell Interface]
[16:25:09.152] In a timer event called from:
[16:25:09.156] data/spells/scripts/hinata/hakke kuushou.lua:onCastSpell
[16:25:09.162] Description:
[16:25:09.165] data/spells/scripts/hinata/hakke kuushou.lua:134: attempt to call global 'getPosfromArea1' (a nil value)
[16:25:09.176] stack traceback:
[16:25:09.178]  data/spells/scripts/hinata/hakke kuushou.lua:134: in function <data/spells/scripts/hinata/hakke kuushou.lua:121>
  
  
  [16:14:18.698] [Error - Spell Interface]
[16:14:18.703] In a timer event called from:
[16:14:18.706] data/spells/scripts/gaara/sabaku kyusou.lua:onCastSpell
[16:14:18.709] Description:
[16:14:18.711] attempt to index a number value
[16:14:18.721] stack traceback:
[16:14:18.725]  [C]: ?
  
  
  
  Spells

Script

Spoiler

Kamui Me


function onCastSpell(cid, var)
local createpos = {x=164, y=54,z=7} --- onde o tp vai aparecer
local Tile1 = {x=160, y=54, z=7} -- onde o player sera teleportado
local Tile2 = {x=160, y=54, z=7} -- onde o player target teleportado


local from1,to1 = {x=1509, y=1259, z=7},{x=1509, y=1255, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from2,to2 = {x=979, y=911, z=7},{x=994, y=918, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from3,to3 = {x=1514, y=1262, z=7},{x=1504, y=1253, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from4,to4 = {x=1552, y=1254, z=7},{x=1561, y=1262, z=7} -- ponto 1 ao ponto 2 da area
local from5,to5 = {x=979, y=911, z=7},{x=994, y=918, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from6,to6 = {x=1156, y=1192, z=7},{x=1172, y=1172, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from7,to7 = {x=664, y=1096, z=7},{x=685, y=1104, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from8,to8 = {x=1553, y=1254, z=7},{x=1562, y=1262, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from9,to9 = {x=1133, y=1039, z=12},{x=972, y=873, z=12} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from10,to10 = {x=1133, y=1039, z=11},{x=972, y=873, z=11} -- ponto 1 ao ponto 2 da area em que ele sera teleportado
local from11,to11 = {x=1133, y=1039, z=10},{x=972, y=873, z=10} -- ponto 1 ao ponto 2 da area em que ele sera teleportado

local pos = getCreaturePosition(cid)
local target = getCreatureTarget(cid)
local targetpos = getCreaturePosition(target)
local topos = {x=pos.x, y=pos.y,z=pos.z}

local storage_x = 50000                   --Storage que guarda a posicao x
local storage_y = 50001                   --Storage que guarda a posicao y
local storage_z = 50002                  --storage que guarda a posicao z

if isInRange(pos, from1, to1) or isInRange(pos, from2, to2) or isInRange(pos, from3, to3) or isInRange(pos, from4, to4) or isInRange(pos, from5, to5) or isInRange(pos, from6, to6) or isInRange(pos, from7, to7) or isInRange(pos, from8, to8) or isInRange(pos, from9, to9) or isInRange(pos, from10, to10) or isInRange(pos, from11, to11) then
doPlayerSendCancel(cid, "Você nao pode usar o Kamui aqui!")
return FALSE
end

local function Teleport_Player(cid)
doTeleportThing(cid, pos)
end

local function Teleport_Target(target)
doTeleportThing(target, targetpos)
end


doTeleportThing(cid, Tile1)
doTeleportThing(target, Tile2)
doSendMagicEffect(pos, 196)
doSendMagicEffect(targetpos, 196)

setPlayerStorageValue(cid, storage_x, pos.x)
setPlayerStorageValue(cid, storage_y, pos.y)
setPlayerStorageValue(cid, storage_z, pos.z)
  
pos.x = getPlayerStorageValue(cid, storage_x)
pos.y = getPlayerStorageValue(cid, storage_y)
pos.z = getPlayerStorageValue(cid, storage_z)

doCreateTeleport(1387,topos, createpos)

doCreatureSay(cid, "Kamui Me", TALKTYPE_MONSTER)
end 
Spoiler

Hakke Kuushou



function getPosfromArea3(cid,area)
icenter = math.floor(table.getn(area)/2)+1
jcenter = math.floor(table.getn(area[1])/2)+1
center = area[icenter]
ivar = table.getn(area)
jvar = table.getn(area[1])
i = table.getn(area)^2
j = table.getn(area[1])^2

   if center[jcenter] == 3 then
                  if getPlayerLookDir(cid) == 0 then
                  signal = {-1,1,1,2}
                  elseif getPlayerLookDir(cid) == 1 then
                  signal = {1,-1,2,1}
                  elseif getPlayerLookDir(cid) == 2 then
                  signal = {1,-1,1,2}
                  else
                  signal = {-1,1,2,1}
                  end
   else
   signal = {-1,1,1,2}
   end

POSITIONS = {}  
P = 0
   
repeat
pvar = {0,0}
I = area[ivar]
J = I[jvar]
i = i-1
j = j-1
   if J == 1 then
                  if jvar < jcenter then  
                  pvar[signal[3]] = signal[1]*math.abs((jcenter-jvar))
                  elseif jvar > jcenter then  
                  pvar[signal[3]] = signal[2]*math.abs((jcenter-jvar))
                  end
                  
                  if ivar < icenter then  
                  pvar[signal[4]] = signal[1]*math.abs((icenter-ivar))
                  elseif ivar > icenter then
                  pvar[signal[4]] = signal[2]*math.abs((icenter-ivar))
                  end
   end    
   if jvar > 1 then
   jvar = (jvar-1)
   elseif ivar > 1 then
   jvar = table.getn(area[1])
   ivar = (ivar-1)
   end  
local pos = getThingPos(cid)
local areapos = {x=pos.x+(pvar[1]),y=pos.y+(pvar[2]),z=pos.z}  
   if pos.x ~= areapos.x or pos.y ~= areapos.y then
   P = P+1
   POSITIONS[P] = areapos
   end   
until i <= 0 and j <= 0

return POSITIONS
end

function doPushCreature3(cid,uid,direction,distance,time)
if isCreature(uid) == TRUE then
    local rand = (2*math.random(0,1))-1
    local rand2 = math.random(-1,0)
    if direction == 0 then
        signal = {0,rand,-rand,rand,-rand,0,-1,-1,-1,0,0,0}
        elseif direction == 1 then
        signal = {1,1,1,0,0,0,0,rand,-rand,rand,-rand,0}
    elseif direction == 2 then
        signal = {0,rand,-rand,rand,-rand,0,1,1,1,0,0,0}
    elseif direction == 3 then
        signal = {-1,-1,-1,0,0,0,0,rand,-rand,rand,-rand,0}
    elseif direction == 4 then
        signal = {-1,rand2,(-rand2)-1,0,1,rand2+1,rand2,0}
    elseif direction == 5 then
        signal = {1,-rand2,-((-rand2)-1),0,1,rand2+1,rand2,0}
    elseif direction == 6 then
        signal = {-1,rand2,(-rand2)-1,0,-1,(-rand2)-1,rand2,0}
    else
        signal = {1,-rand2,-((-rand2)-1),0,-1,(-rand2)-1,rand2,0}
    end
    local pos = getThingPos(uid)
    nsig = #signal
    nvar = 0
    repeat
        nvar = nvar+1
        newpos = {x=pos.x+(signal[nvar]),y=pos.y+(signal[(nsig/2)+nvar]),z=pos.z}
        newtile = {x=newpos.x,y=newpos.y,z=newpos.z,stackpos=0}
    until getTileThingByPos(newtile).uid ~= 0 and hasProperty(getTileThingByPos(newtile).uid,3) == FALSE and queryTileAddThing(uid,newpos) == 1 or nvar == (nsig/2)
    if distance == nil or distance == 1 then
        local hit = math.random((getPlayerLevel(cid) * 0.90 + getPlayerMagLevel(cid) * 1.70) * 1.0,(getPlayerLevel(cid) * 1.00 + getPlayerMagLevel(cid) * 1.80) * 1.0)
        doTeleportThing(uid,newpos,TRUE)        
        doSendMagicEffect(getCreaturePosition(uid), 54) -- 12, effect ao acertar o player.
        if getCreatureHealth(uid) > hit then
            if getCreatureHealth(uid) > 0 then
                doSendAnimatedText(getCreaturePosition(uid), hit, 144)
            end
            doCreatureAddHealth(uid, -hit)
        else
            if getCreatureHealth(uid) > 0 then
                doSendAnimatedText(getCreaturePosition(uid), getCreatureHealth(uid), 144)
            end
            doCreatureAddHealth(uid, -getCreatureHealth(uid))
        end
    else
    distance = distance-1
    doTeleportThing(uid,newpos,TRUE)
        if time ~= nil then
            addEvent(doPushCreature3,time,cid,uid,direction,distance,time)
        else
            addEvent(doPushCreature3,500,cid,uid,direction,distance,500)
        end
    end
end
end

function onCastSpell(cid, words, param)

local function TRES(cid)
local area = {
{0, 0, 0},
{0, 1, 0},
{0, 1, 0},
{0, 1, 0},
{0, 3, 0},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
}

pos = getPosfromArea1(cid,area)
n = 0

while n < #pos do
n = n+1
doSendMagicEffect(pos[n],54)
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}
if isCreature(getThingfromPos(thing).uid) == TRUE then
doPushCreature3(cid, getThingfromPos(thing).uid,getPlayerLookDir(cid))
end
end
end

local function QUATRO(cid)
local area = {
{0, 1, 0},
{0, 1, 0},
{0, 1, 0},
{0, 0, 0},
{0, 0, 0},
{0, 3, 0},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
}

pos = getPosfromArea1(cid,area)
n = 0

while n < #pos do
n = n+1
doSendMagicEffect(pos[n],54)
thing = {x=pos[n].x,y=pos[n].y,z=pos[n].z,stackpos=253}
if isCreature(getThingfromPos(thing).uid) == TRUE then
doPushCreature3(cid, getThingfromPos(thing).uid,getPlayerLookDir(cid))
end
end
end

addEvent(TRES, 1, cid)
addEvent(QUATRO, 300, cid)
return TRUE
end

 

Spoiler

Sabaku Kyusou




local combat1 = createCombatObject()
setCombatParam(combat1, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat1, COMBAT_PARAM_EFFECT, 134)
setCombatFormula(combat1, COMBAT_FORMULA_LEVELMAGIC, -31.2, 1, -32.2, 1)

local combat2 = createCombatObject()
setCombatParam(combat2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat2, COMBAT_PARAM_EFFECT, 134)
setCombatFormula(combat2, COMBAT_FORMULA_LEVELMAGIC, -35.2, 1, -30.2, 1)

local combat3 = createCombatObject()
setCombatParam(combat3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
setCombatParam(combat3, COMBAT_PARAM_EFFECT, 197)
setCombatFormula(combat3, COMBAT_FORMULA_LEVELMAGIC, -32.2, 1, -31.2, 1)

local condition = createConditionObject(CONDITION_PARALYZE)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20000)
setConditionParam(condition, CONDITION_PARAM_SPEED, -300)
setConditionFormula(condition, -0.7, 0, -0.7, 0)
setCombatCondition(combat1, condition)


arr1 = {
	{3}
}

arr2 = {
	{3}
}

arr3 = {
	{3}
}


local area1 = createCombatArea(arr1)
local area2 = createCombatArea(arr2)
local area3 = createCombatArea(arr3)
setCombatArea(combat1, area1)
setCombatArea(combat2, area2)
setCombatArea(combat3, area3)
 
local function onCastSpell1(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat1, parameters.var)
end
 
local function onCastSpell2(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat2, parameters.var)
end

local function onCastSpell3(parameters)
    return isPlayer(parameters.cid) and doCombat(parameters.cid, combat3, parameters.var)
end

 
function onCastSpell(cid, var)
local position14 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local position15 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local position16 = {x=getThingPosition(getCreatureTarget(cid)).x+2, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z}
local parameters = { cid = cid, var = var}
addEvent(onCastSpell1, 200, parameters)
addEvent(onCastSpell2, 600, parameters)
addEvent(onCastSpell3, 1000, parameters)
addEvent(doSendMagicEffect, position16, 197, parameters)
	doSendMagicEffect(position14, 166)
return TRUE
end 

 

 

 

TFS 0.4

Editado por ZikaLord (veja o histórico de edições)

O rei de seu proprio destino é aquele que luta pela gloria do amanhã!
Discord : ZoR#9373


 

Postado

@ZikaLord o "problema" do kamui me "postado no tópico", é que você ta tentando criar um teleporte, mas para onde o teleporte vai levar ? E onde ele será criado ?

doCreateTeleport(1387,topos, createpos)

 

a posição para onde o teleporte vai levar e onde será criado, não foram declarada! 

 

 

O segundo erro, na hora de chamar essa função getPosfromArea1  ela não existe no script, nem em nenhuma lib.

                                                              ezgif-1-98aab239f3.gif.1a897c9c3225228909e7b356a5cfb8e4.gif

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo