Ir para conteúdo

Featured Replies

Postado

Galera tou com um poblema com essa spell

 

 

local newPos = {x = 1019, y = 1555, z = 7} --
local time = 10 --
local function teleport(cid, pos)
if isCreature(cid) then
doTeleportThing(cid, getClosestFreeTile(cid, pos))
doSendMagicEffect(getPlayerPosition(cid), 196)
end
end

function onCastSpell(cid, var)
local waittime = 0.8 -- Tempo de exhaustion
local storage = 115820
local target = getCreatureTarget(cid)
if not isCreature(target) then
 doPlayerSendCancel(cid, "You are exhausted")
return false
end
local posTarget = getPlayerPosition(target)
teleport(target, newPos)
addEvent(teleport, time*1000, target, posTarget)
exhaustion.set(cid, storage, waittime)
return true
end

 

ela nao apareçe o exausted no chat alguem pode me ajudar ?

essa spell chama kamui manda player pra um outro lugar

  • Respostas 60
  • Visualizações 1.6k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Bodak Reborn
    Bodak Reborn

    Não conheço narutibia, caso o script dê erro, tente dar mais detalhes. Ficou muito vago pra mim, me baseei pelo seu script.   local config = { newPos = {x = 1019, y = 1555, z = 7}, time = 10,

  • Bodak Reborn
    Bodak Reborn

    local config = { newPos = {x = 1019, y = 1555, z = 7}, -- posição para onde os jogadores irão. tpPos = {x = 1050, y = 1560, z = 7}, -- posição onde será criado o teleporte. tptoPos = {x = 1000, y = 20

  • Bodak Reborn
    Bodak Reborn

    function doMarkPos(cid, posx, posy, posz) setPlayerStorageValue(cid, 19000, posx) setPlayerStorageValue(cid, 19001, posy) setPlayerStorageValue(cid, 19002, posz) end function getMarkPos(cid) retur

Postado

Não conheço narutibia, caso o script dê erro, tente dar mais detalhes. Ficou muito vago pra mim, me baseei pelo seu script.

 

local config = {
newPos = {x = 1019, y = 1555, z = 7},
time = 10,
exahaust = 0.8, -- em segundos.
storage = 115820,
target = getCreatureTarget(cid),
posTarget = getPlayerPosition(target),
}

local function teleport(cid, pos)
	if isCreature(cid) then
		doTeleportThing(cid, getClosestFreeTile(cid, pos))
		doSendMagicEffect(getPlayerPosition(cid), 196)
	end
end

function onCastSpell(cid, var)	
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		setPlayerStorageValue(cid, config.exhaust, config.time + os.time())
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
	doTeleportThing(config.target, config.newPos)
	addEvent(teleport, time*1000, config.target, config.posTarget)
return true
end

 

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

Postado
  • Autor
  Em 30/04/2016 em 02:03, Talesigorvr disse:

Não conheço narutibia, caso o script dê erro, tente dar mais detalhes. Ficou muito vago pra mim, me baseei pelo seu script.

 


local config = {
newPos = {x = 1019, y = 1555, z = 7},
time = 10,
exahaust = 0.8,
storage = 115820,
target = getCreatureTarget(cid),
posTarget = getPlayerPosition(target),
}

local function teleport(cid, pos)
	if isCreature(cid) then
		doTeleportThing(cid, getClosestFreeTile(cid, pos))
		doSendMagicEffect(getPlayerPosition(cid), 196)
	end
end

function onCastSpell(cid, var)	
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		setPlayerStorageValue(cid, config.exhaust, config.time + os.time())
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
		doTeleportThing(config.target, config.newPos)
		addEvent(teleport, time*1000, config.target, config.posTarget)
return true
end

 

esse erro

 

http://prntscr.com/ayjtk9

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.6k

Informação Importante

Confirmação de Termo