Server 13x Problema al usar los TP de quest "The First Dragon"

S

Sasketoon

Invited
Problema en consola al pisar los TP de la quest de first dragon.

Uso servidor : https://opengamescommunity.com/inde...wheel-of-destiny-hazard-system-bosstiary.852/

Cliente : https://opengamescommunity.com/index.php?resources/categories/13x-endless-rl-custom.78/

imagen_2023-07-16_204038119.png

Codigo LUA

local UniqueTable = {
-- Tazhadur entrance
[35001] = {
range = 10,
timer = Storage.FirstDragon.TazhadurTimer,
newPos = {x = 32015, y = 32466, z = 8},
bossName = "Tazhadur",
bossPos = {x = 32018, y = 32465, z = 8}
},
-- Kalyassa entrance
[35002] = {
range = 10,
timer = Storage.FirstDragon.KalyassaTimer,
newPos = {x = 32078, y = 32456, z = 8},
bossName = "Kalyassa",
bossPos = {x = 32079, y = 32459, z = 8}
},
-- Zorvorax entrance
[35003] = {
range = 10,
timer = Storage.FirstDragon.ZorvoraxTimer,
newPos = {x = 32008, y = 32396, z = 8},
bossName = "Zorvorax",
bossPos = {x = 32015, y = 32396, z = 8}
},
-- Gelidrazah entrance
[35004] = {
range = 10,
timer = Storage.FirstDragon.GelidrazahTimer,
newPos = {x = 32076, y = 32402, z = 8},
bossName = "Gelidrazah The Frozen",
bossPos = {x = 32078, y = 32400, z = 8}
}
}

local entranceTeleport = MoveEvent()
function entranceTeleport.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return
end

local setting = UniqueTable[item.uid]
if not setting then
return true
end

if roomIsOccupied(setting.bossPos, setting.range, setting.range) then
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say("Someone is fighting against the boss! You need wait a while.", TALKTYPE_MONSTER_SAY)
return true
end

if player:getStorageValue(setting.timer) >= os.time() then
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say("You have to wait to challenge this enemy again!", TALKTYPE_MONSTER_SAY)
return true
end

if player:getStorageValue(setting.storage) >= setting.value then
local monster = Game.createMonster(setting.bossName, setting.bossPos, true, true)
if not monster then
return true
end

player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:teleportTo(setting.newPos)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say("You have ten minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", TALKTYPE_MONSTER_SAY)
player:setStorageValue(setting.timer, os.time() + 2 * 3600)
addEvent(clearBossRoom, 60 * 30 * 1000, player.uid, monster.uid, setting.bossPos, setting.range, fromPosition)
return true
end
return true
end

for index, value in pairs(UniqueTable) do
entranceTeleport:uid(index)
end

entranceTeleport:register()

Alguna sugerencia de como solucionarlo?
 
Problema en consola al pisar los TP de la quest de first dragon.

Uso servidor : https://opengamescommunity.com/inde...wheel-of-destiny-hazard-system-bosstiary.852/

Cliente : https://opengamescommunity.com/index.php?resources/categories/13x-endless-rl-custom.78/

View attachment 3822

Codigo LUA



Alguna sugerencia de como solucionarlo?
Hola ,
De memoria creo que he quitado los storages en la próxima actualización para que se pueda ir directamente

Quitando
player:getStorageValue(setting.storage) >= setting.value
Reemplazando por if player then

Y no el timer solo el storage.

PS: Confirmo que lo cambié y lo dejé asi:

JavaScript:
local UniqueTable = {
    -- Tazhadur entrance
    [35001] = {
        range = 10,
        timer = Storage.FirstDragon.TazhadurTimer,
        newPos = {x = 32015, y = 32466, z = 8},
        bossName = "Tazhadur",
        bossPos = {x = 32018, y = 32465, z = 8}
    },
    -- Kalyassa entrance
    [35002] = {
        range = 10,
        timer = Storage.FirstDragon.KalyassaTimer,
        newPos = {x = 32078, y = 32456, z = 8},
        bossName = "Kalyassa",
        bossPos = {x = 32079, y = 32459, z = 8}
    },
    -- Zorvorax entrance
    [35003] = {
        range = 10,
        timer = Storage.FirstDragon.ZorvoraxTimer,
        newPos = {x = 32008, y = 32396, z = 8},
        bossName = "Zorvorax",
        bossPos = {x = 32015, y = 32396, z = 8}
    },
    -- Gelidrazah entrance
    [35004] = {
        range = 10,
        timer = Storage.FirstDragon.GelidrazahTimer,
        newPos = {x = 32076, y = 32402, z = 8},
        bossName = "Gelidrazah The Frozen",
        bossPos = {x = 32078, y = 32400, z = 8}
    }
}

local entranceTeleport = MoveEvent()
function entranceTeleport.onStepIn(creature, item, position, fromPosition)
    local player = creature:getPlayer()
    if not player then
        return
    end

    local setting = UniqueTable[item.uid]
    if not setting then
        return true
    end

    if roomIsOccupied(setting.bossPos, setting.range, setting.range) then
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:teleportTo(fromPosition)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:say("Someone is fighting against the boss! You need wait a while.", TALKTYPE_MONSTER_SAY)
        return true
    end

    if player:getStorageValue(setting.timer) >= os.time() then
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:teleportTo(fromPosition)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:say("You have to wait to challenge this enemy again!", TALKTYPE_MONSTER_SAY)
        return true
    end
    
    if player:getStorageValue(setting.timer) < os.time() then
        local monster = Game.createMonster(setting.bossName, setting.bossPos, true, true)
        if not monster then
            return true
        end

        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:teleportTo(setting.newPos)
        player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
        player:say("You have ten minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", TALKTYPE_MONSTER_SAY)
        player:setStorageValue(setting.timer, os.time() + 2 * 3600)
        addEvent(clearBossRoom, 60 * 30 * 1000, player.uid, monster.uid, setting.bossPos, setting.range, fromPosition)
        return true
    end
    return true
end

for index, value in pairs(UniqueTable) do
    entranceTeleport:uid(index)
end

entranceTeleport:register()
 
Last edited:

Tibia Server Lists

#1 FEATURED US Ultron OT 1,532 / 5,000Online EXPStages PROTO8.6 ENGINEUltron OT RANK PTS5.9 +100% VOTES0 #2 FEATURED US Nefera 141 / 0Online EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.1 +100% VOTES0 #3 FEATURED ES Deixis 0 / 0Offline EXPStages PROTO1098 ENGINETFS RANK PTS3.7 +100% VOTES1 #4 FEATURED ES Maeli 5 / 150Online EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.7 +100% VOTES0 #5 MX Marlboro War 33 / 300Online EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -33% VOTES0 #6 BR Tibinha YurOts 17 / 150Online EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.2 -14% VOTES0 #7 US Halera 2 / 0Online EXPStages PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.9 -83% VOTES0 #8 BR Exordion Legacy 52 / 2,000Online EXPx2 PROTO7.72 ENGINEExordion RANK PTS4.9 +100% VOTES0 #9 PL Lubelski 8 / 1,000Online EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.6 -15% VOTES0 #10 ES JustRL FreeTC 1530 38 / 250Online EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS4.3 +100% VOTES0 #11 DE DBU Online 0 / 400Online EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS4.3 +100% VOTES0 #12 PL ReWar 0 / 2,000Online EXPcustom PROTO8.6 ENGINEOther RANK PTS4.3 0% VOTES0 #13 PL Velesta 0 / 1,000Offline EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.3 -99% VOTES0 #14 ES Farlia Global 2026 0 / 333Offline EXPx5 PROTO15.25 ENGINEFarliaServ 1.525 RANK PTS3.9 -22% VOTES0 #15 SE MortalisOT Custom 0 / 500Offline EXP100x -1.2x PROTO10.98 ENGINEMortalisOT V1 RANK PTS3.8 +100% VOTES0 #16 US Rommania 0 / 500Online EXPstages, x10 PROTO7.4 ENGINETFS 0.4 RANK PTS3.6 +100% VOTES0 #17 US BerethaOnline 1 / 2,000Online EXPStages PROTO10.98 ENGINETFS RANK PTS3.5 +100% VOTES0
Top