Alguien me podria ayudar con este error de excercise training por favor

CesarACR45

Member
Messages
5
Points
123
sf
Buen dia, el problema es que al usar las armas de entrenamiento, solo lanza una, y da error en la consola, es 12.85 el servidor, lo descargue aqui, si alguien sabe, estaria agredecido


1684454582491.png
 
sf
Buen dia, el problema es que al usar las armas de entrenamiento, solo lanza una, y da error en la consola, es 12.85 el servidor, lo descargue aqui, si alguien sabe, estaria agredecido


View attachment 3703

Hola, lo que entiendo es que te saca un error de la base speed, pero no checa por la vocation.
No estarás haciéndolo con el GOD y sin vocation ?
Prueba con una vocation normal, a ver qué tal.

En el caso de que siga dando error, entra en data/lib/tables/exercise_training.lua abre el archivo y reemplaza el código por este:

JavaScript:
exerciseWeaponsTable = {
    -- MELE
    [28540] = { skill = SKILL_SWORD },
    [28552] = { skill = SKILL_SWORD },
    [35279] = { skill = SKILL_SWORD },
    [35285] = { skill = SKILL_SWORD },
    [28553] = { skill = SKILL_AXE },
    [28541] = { skill = SKILL_AXE },
    [35280] = { skill = SKILL_AXE },
    [35286] = { skill = SKILL_AXE },
    [28554] = { skill = SKILL_CLUB },
    [28542] = { skill = SKILL_CLUB },
    [35281] = { skill = SKILL_CLUB },
    [35287] = { skill = SKILL_CLUB },
    -- ROD
    [28544] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true },
    [28556] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true },
    [35283] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true },
    [35289] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_SMALLICE, allowFarUse = true },
    -- RANGE
    [28543] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true },
    [28555] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true },
    [35282] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true },
    [35288] = { skill = SKILL_DISTANCE, effect = CONST_ANI_SIMPLEARROW, allowFarUse = true },
    -- WAND
    [28545] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true },
    [28557] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true },
    [35284] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true },
    [35290] = { skill = SKILL_MAGLEVEL, effect = CONST_ANI_FIRE, allowFarUse = true }
}

freeDummies = {28558, 28565}
maxAllowedOnADummy = configManager.getNumber(configKeys.MAX_ALLOWED_ON_A_DUMMY)
houseDummies = {28559, 28560, 28561, 28562, 28563, 28564}

local magicLevelRate = configManager.getNumber(configKeys.RATE_MAGIC)
local skillLevelRate = configManager.getNumber(configKeys.RATE_SKILL)

function leaveTraining(playerId)
    if onExerciseTraining[playerId] then
        stopEvent(onExerciseTraining[playerId].event)
        onExerciseTraining[playerId] = nil
    end

    local player = Player(playerId)
    if player then
        player:setTraining(false)
    end
    return
end

function exerciseEvent(playerId, tilePosition, weaponId, dummyId)
    local player = Player(playerId)
    if not player then
        return leaveTraining(playerId)
    end

    if player:isTraining() == 0 then
        return leaveTraining(playerId)
    end

    if not Tile(tilePosition):getItemById(dummyId) then
        player:sendTextMessage(MESSAGE_FAILURE, "Someone has moved the dummy, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    local playerPosition = player:getPosition()
    if not getTilePzInfo(playerPosition) then
        player:sendTextMessage(MESSAGE_FAILURE, "You are no longer in a protection zone, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    if player:getItemCount(weaponId) <= 0 then
        player:sendTextMessage(MESSAGE_FAILURE, "You need the training weapon in the backpack, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    local weapon = player:getItemById(weaponId, true)
    if not weapon:isItem() or not weapon:hasAttribute(ITEM_ATTRIBUTE_CHARGES) then
        player:sendTextMessage(MESSAGE_FAILURE, "The selected item is not a training weapon, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    local weaponCharges = weapon:getAttribute(ITEM_ATTRIBUTE_CHARGES)
    if not weaponCharges or weaponCharges <= 0 then
        weapon:remove(1) -- ??
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your training weapon has disappeared.")
        leaveTraining(playerId)
        return
    end

    local isMagic = false
    local bonusDummy = isInArray(houseDummies, weaponId) or nil
    local skillToTraining = skillsStages or nil
    local skillRateDefault = skillLevelRate
    local skillLevel = player:getSkillLevel(exerciseWeaponsTable[weaponId].skill)

    if exerciseWeaponsTable[weaponId].skill == SKILL_MAGLEVEL then
        skillToTraining = magicLevelStages or nil
        skillRateDefault = magicLevelRate
        skillLevel = player:getBaseMagicLevel()
        isMagic = true
    end

    local expRate = getRateFromTable(skillToTraining, skillLevel, skillRateDefault)
    if bonusDummy then bonusDummy = 1.1 else bonusDummy = 1 end

    if isMagic then
        player:addManaSpent(math.ceil(500 * expRate) * bonusDummy)
    else
        player:addSkillTries(exerciseWeaponsTable[weaponId].skill, (7 * expRate) * bonusDummy)
    end

    weapon:setAttribute(ITEM_ATTRIBUTE_CHARGES, (weaponCharges - 1))
    tilePosition:sendMagicEffect(CONST_ME_HITAREA)

    if exerciseWeaponsTable[weaponId].effect then
        playerPosition:sendDistanceEffect(tilePosition, exerciseWeaponsTable[weaponId].effect)
    end

    if weapon:getAttribute(ITEM_ATTRIBUTE_CHARGES) <= 0 then
        weapon:remove(1)
        player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Your training weapon has disappeared.")
        leaveTraining(playerId)
        return
    end

    local vocation = player:getVocation()
    if not vocation then
        player:sendTextMessage(MESSAGE_FAILURE, "Invalid vocation, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    local baseAttackSpeed = vocation:getBaseAttackSpeed()
    if not baseAttackSpeed then
        player:sendTextMessage(MESSAGE_FAILURE, "Unable to retrieve base attack speed, the training has stopped.")
        leaveTraining(playerId)
        return
    end

    onExerciseTraining[playerId].event = addEvent(exerciseEvent, baseAttackSpeed / configManager.getFloat(configKeys.RATE_EXERCISE_TRAINING_SPEED), playerId, tilePosition, weaponId, dummyId)
    return
end
 

Tibia Server Lists

#1 FEATURED US Ultron OT 1,535 / 5,000Online EXPStages PROTO8.6 ENGINEUltron OT RANK PTS5.9 +100% VOTES0 #2 FEATURED US Nefera 0 / 0Offline EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.1 +100% VOTES0 #3 FEATURED ES Deixis 1 / 0Online EXPStages PROTO1098 ENGINETFS RANK PTS3.7 +100% VOTES1 #4 FEATURED ES Maeli 4 / 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 51 / 2,000Online EXPx2 PROTO7.72 ENGINEExordion RANK PTS4.9 +100% VOTES0 #9 PL Lubelski 7 / 1,000Online EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.6 -15% VOTES0 #10 ES JustRL FreeTC 1530 35 / 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