Aonde está getThingPos mude para getThingfromPos
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

Editado Agosto 16 por Fawz
Aonde está getThingPos mude para getThingfromPos
parou de da o erro, porém ainda da dbug, sendo que sem acusar nada no distro.
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

Assim que eu chegar em casa eu adapto ele pra você porque tem que mudar algumas coisas.
Assim que eu chegar em casa eu adapto ele pra você porque tem que mudar algumas coisas.
okay brother, estarei no aguardo. Obrigado ![]()
info
Grupo: Marquês
Registrado: 03/02/13
Posts: 1.2k
Reputação: +254
Gênero: Masculino
Char no Tibia: Partiu Baladinha

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 Agosto 16 por Fawz
funcionou perfeitamente, obrigado pela ajuda ![]()
Editado Agosto 16 por espalha




info
Grupo: Campones
Registrado: 24/04/08
Posts: 66
Reputação: +1
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]
[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