Ir para conteúdo
  • 0

[movements] getThingPos [tfs 1.2]


espalha

Pergunta

Que que acontece, tenho um script de BOSS. Toda vez que o player passa no tile ele dá DBUG.

 

È um tile que apenas a pessoa que terminar a task consegue passar e matar o boss, o problema é que quando passa tá dando uns erros.

 

Já tentei atualizar o compat na pasta/lib/compat, dai ele para de acusar o erro porém continua dando DBUG.

 

 

[ERRO]

 

 

25481.jpg

 

 

 

 

[sCRIPT]

 

 

local spawnboss = {x=66,y=490,z=8}
local spawnplayer = {x=68,y=483,z=8}
local NWcorner = {x=60,y=481,z=8, stackpos = 255}
local SEcorner = {x=76,y=494,z=8, stackpos = 255}
local deny = {x=311, y=403, z=12}

local storage = {65030,2} -- storage required to enter
local keyafter = -1 -- key that will be set to storage above when player enters arena
local boss = "demodras"
local fighttime = 10 * 60 * 1000 -- ten minutes
local delayglobal = 95001 -- enterance counter storage returning remaining time of current user

function kickEvent1(cid, item, position, fromPosition)
if getCreaturesInQuestArea(TYPE_PLAYER, NWcorner, SEcorner, GET_COUNT) > 0 then
doTeleportThing(cid, deny)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doCreatureSay(cid, "Time up. Your chance is over.", TALKTYPE_ORANGE_1)
end
end

function onStepIn(cid, item, pos)
if getPlayerStorageValue (cid, storage[1]) == storage[2] then
if getCreaturesInQuestArea(TYPE_PLAYER, NWcorner, SEcorner, GET_COUNT) > 0 then
doTeleportThing(cid,deny)
doCreatureSay(cid, 'Someone is still in this room. Please wait for your turn(max ' .. getGlobalStorageValue(delayglobal)-os.time() .. ' seconds left).', TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(cid), CONST_ME_FIREAREA)
else
doTeleportThing(cid,spawnplayer)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_FIREAREA)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doCreatureSay(cid, 'You have ten minutes to slain your enemy, otherwise you will be kicked out.', TALKTYPE_ORANGE_1)
setGlobalStorageValue(delayglobal, os.time() + (fighttime / 1000))
setPlayerStorageValue(cid,storage[1],keyafter)
doSummonCreature(boss, spawnboss)
demodras = addEvent(kickEvent1, fighttime, cid)
end
else
doTeleportThing(cid,deny)
doCreatureSay(cid, 'You are not allowed to enter here!', TALKTYPE_ORANGE_1)
doSendMagicEffect(getThingPos(cid), CONST_ME_FIREAREA)
end
doSendMagicEffect(getThingPos(item.uid), CONST_ME_PURPLEENERGY)
return true
end

 

 

Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

 

okay brother, estarei no aguardo. Obrigado :)

Testei aqui e não deu debug.

local spawnboss = {x=66,y=490,z=8}
local spawnplayer = {x=68,y=483,z=8}
local NWcorner = {x=60,y=481,z=8, stackpos = 255}
local SEcorner = {x=76,y=494,z=8, stackpos = 255}
local deny = {x=311, y=403, z=12}

local storage = {65030,2} -- storage required to enter
local keyafter = -1 -- key that will be set to storage above when player enters arena
local boss = "demodras"
local fighttime = 10 * 60 * 1000 -- ten minutes
local delayglobal = 95001 -- enterance counter storage returning remaining time of current user

function kickEvent1(cid, item, position, fromPosition)
	if getCreaturesInQuestArea(TYPE_PLAYER, NWcorner, SEcorner, GET_COUNT) > 0 then
		doTeleportThing(cid, deny)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
		doCreatureSay(cid, "Time up. Your chance is over.", TALKTYPE_ORANGE_2, false, nil, getCreaturePosition(cid))
	end
end

function onStepIn(cid, item, pos)
	if getPlayerStorageValue (cid, storage[1]) == storage[2] then
		if getCreaturesInQuestArea(TYPE_PLAYER, NWcorner, SEcorner, GET_COUNT) > 0 then
			doTeleportThing(cid,deny)
			doCreatureSay(cid, "Someone is still in this room. Please wait for your turn(max " .. getGlobalStorageValue(delayglobal)-os.time() .. " seconds left).", TALKTYPE_ORANGE_2, false, nil, pos)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREAREA)
		else
			doTeleportThing(cid,spawnplayer)
			doSendMagicEffect(getCreaturePosition(cid),CONST_ME_FIREAREA)
			doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
			doCreatureSay(cid, "You have ten minutes to slain your enemy, otherwise you will be kicked out.", TALKTYPE_ORANGE_2, false, nil, pos)
			setGlobalStorageValue(delayglobal, os.time() + (fighttime / 1000))
			setPlayerStorageValue(cid,storage[1],keyafter)
			doSummonCreature(boss, spawnboss)
			demodras = addEvent(kickEvent1, fighttime, cid)
		end
	else
		doTeleportThing(cid,deny)
		doCreatureSay(cid, "You are not allowed to enter here!", TALKTYPE_ORANGE_2, false, nil, pos)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREAREA)
	end
	doSendMagicEffect(getThingfromPos(item.uid), CONST_ME_PURPLEENERGY)
	return true
end
Editado por Fawz
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...