Ir para conteúdo

Featured Replies

Postado

Você testou? Está funcionando?

Se não tiver, tente esse:

 

Spoiler

function doMarkPos(cid, posx, posy, posz)
	setPlayerStorageValue(cid, 19000, posx)
	setPlayerStorageValue(cid, 19001, posy)
	setPlayerStorageValue(cid, 19002, posz)
end
function getMarkPos(cid)
	return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)}
end

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.
exhaust = 0.8, 
target = getCreatureTarget(cid),
storage = 115820, 
}

function onCastSpell(cid, var)
	local pos = getCreaturePosition(cid)
	if getMarkPos(cid).x =< 1 then
		print (1)
		doMarkPos(cid, pos.x, pos.y, pos.z)
	end
	print (2)
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		if getMarkPos(cid).x > 0 then
			print (3)
			doCreateTeleport(1387,  getMarkPos(cid), config.tpPos)
			doTeleportThing(cid, config.newPos)
			setPlayerStorageValue(cid, config.storage, config.exhaust + os.time())
		end
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
return true
end

 

 

Não dou suporte via PM, crie um tópico caso tenha dúvidas.

Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.

  • Respostas 60
  • Visualizações 2k
  • 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
  • Autor
6 minutos atrás, Talesigorvr disse:

Você testou? Está funcionando?

Se não tiver, tente esse:

 

  Ocultar conteúdo


function doMarkPos(cid, posx, posy, posz)
	setPlayerStorageValue(cid, 19000, posx)
	setPlayerStorageValue(cid, 19001, posy)
	setPlayerStorageValue(cid, 19002, posz)
end
function getMarkPos(cid)
	return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)}
end

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.
exhaust = 0.8, 
target = getCreatureTarget(cid),
storage = 115820, 
}

function onCastSpell(cid, var)
	local pos = getCreaturePosition(cid)
	if getMarkPos(cid).x =< 1 then
		print (1)
		doMarkPos(cid, pos.x, pos.y, pos.z)
	end
	print (2)
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		if getMarkPos(cid).x > 0 then
			print (3)
			doCreateTeleport(1387,  getMarkPos(cid), config.tpPos)
			doTeleportThing(cid, config.newPos)
			setPlayerStorageValue(cid, config.storage, config.exhaust + os.time())
		end
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
return true
end

 

 

http://prntscr.com/ayvafo

 

 

 

Postado

Ops

 

Spoiler

function doMarkPos(cid, posx, posy, posz)
	setPlayerStorageValue(cid, 19000, posx)
	setPlayerStorageValue(cid, 19001, posy)
	setPlayerStorageValue(cid, 19002, posz)
end
function getMarkPos(cid)
	return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)}
end

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.
exhaust = 0.8, 
target = getCreatureTarget(cid),
storage = 115820, 
}

function onCastSpell(cid, var)
	local pos = getCreaturePosition(cid)
	if getMarkPos(cid).x <= 1 then
		print (1)
		doMarkPos(cid, pos.x, pos.y, pos.z)
	end
	print (2)
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		if getMarkPos(cid).x > 0 then
			print (3)
			doCreateTeleport(1387,  getMarkPos(cid), config.tpPos)
			doTeleportThing(cid, config.newPos)
			setPlayerStorageValue(cid, config.storage, config.exhaust + os.time())
		end
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
return true
end

 

 

Não dou suporte via PM, crie um tópico caso tenha dúvidas.

Isso previne que outras pessoas com a mesma dúvida criem tópicos desnecessários.

Postado
  • Autor
2 minutos atrás, Talesigorvr disse:

Ops

 

  Ocultar conteúdo


function doMarkPos(cid, posx, posy, posz)
	setPlayerStorageValue(cid, 19000, posx)
	setPlayerStorageValue(cid, 19001, posy)
	setPlayerStorageValue(cid, 19002, posz)
end
function getMarkPos(cid)
	return {x=getPlayerStorageValue(cid, 19000), y=getPlayerStorageValue(cid, 19001), z=getPlayerStorageValue(cid, 19002)}
end

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.
exhaust = 0.8, 
target = getCreatureTarget(cid),
storage = 115820, 
}

function onCastSpell(cid, var)
	local pos = getCreaturePosition(cid)
	if getMarkPos(cid).x <= 1 then
		print (1)
		doMarkPos(cid, pos.x, pos.y, pos.z)
	end
	print (2)
	if getPlayerStorageValue(cid, config.exhaust) < os.time() then
		if getMarkPos(cid).x > 0 then
			print (3)
			doCreateTeleport(1387,  getMarkPos(cid), config.tpPos)
			doTeleportThing(cid, config.newPos)
			setPlayerStorageValue(cid, config.storage, config.exhaust + os.time())
		end
	else
		doPlayerSendCancel(cid, "You are exhausted")
	end
return true
end

 

 

erro       http://prntscr.com/ayvc8k

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