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,431 / 5,000 EXPStages PROTO8.6 ENGINEUltron OT RANK PTS6.6 -9% VOTES0 #2 FEATURED US Nefera 187 / 0 EXPx1 PROTO15.20 ENGINECrystal Server RANK PTS5.9 +25% VOTES0 #3 FEATURED CL ZHYRAVEX 11 / 500 EXPx5 PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.8 +100% VOTES0 #4 FEATURED ES Deixis 0 / 0 EXPStages PROTO1098 ENGINETFS RANK PTS4.0 -61% VOTES1 #5 DE DBU Online 224 / 400 EXP11 PROTO8.6 ENGINETFS 1.0 RANK PTS6.1 +1,000% VOTES0 #6 BR Exordion Legacy 69 / 2,000 EXPx2 PROTO7.72 ENGINEExordion RANK PTS5.7 +2% VOTES0 #7 MX Marlboro War 44 / 300 EXP999 PROTO8.6 ENGINETFS 0.3.7 RANK PTS5.5 -28% VOTES0 #8 BR Tibinha YurOts 20 / 150 EXPStages PROTO7.4 ENGINEYurOTS 1.5 RANK PTS5.5 +3% VOTES0 #9 US Wiki Ots 50 / 1,000 EXPx9999 PROTOcustom client ENGINETFS 1.4.2 RANK PTS5.0 +100% VOTES0 #10 ES JustRL FreeTC 1530 17 / 250 EXPx2 PROTO15.30 ENGINECrystal Server RANK PTS5.0 +18% VOTES0 #11 PL Lubelski 9 / 1,000 EXP200 PROTO7.6 ENGINELubelskiOTS 2.56.0 RANK PTS4.9 -17% VOTES0 #12 PL ReWar 0 / 2,000 EXPcustom PROTO8.6 ENGINEOther RANK PTS4.6 +100% VOTES0 #13 BR Turion Server 0 / 2,000 EXPx1 PROTO7.4 ENGINETurion 7.7 Project RANK PTS4.6 +182% VOTES0 #14 US Halera 0 / 0 EXPStages PROTO10.98 ENGINETFS 1.4.2 RANK PTS4.4 -81% VOTES0 #15 PL Velesta 0 / 1,000 EXP20 PROTO8.0 ENGINETFS 1.4.2 RANK PTS4.4 -100% VOTES0 #16 US BerethaOnline 0 / 2,000 EXPStages PROTO15.0 ENGINETFS RANK PTS4.3 -77% VOTES0 #17 ES Farlia Global 2026 0 / 333 EXPx5 PROTO15.25 ENGINEFarliaServ 1.525 RANK PTS4.0 -100% VOTES0 #18 SE MortalisOT Custom 0 / 500 EXP100x -1.2x PROTO10.98 ENGINEMortalisOT V1 RANK PTS4.0 -100% VOTES0 #19 RU Oldavia | 8.60 0 / 0 EXPx9999 PROTO8.6 ENGINETFS 1.3 RANK PTS3.9 +100% VOTES0 #20 US Rommania 0 / 3,000 EXPstages, x10 PROTO7.4 ENGINETFS 0.4 RANK PTS3.7 -89% VOTES0 #21 MX Maeli 0 / 150 EXPx10 PROTO10.98 ENGINETFS 1.4.2 RANK PTS3.5 -34% VOTES0 #22 ES DarkDragon EXPx10 PROTO8.6 ENGINECanary RANK PTS0.0 0% VOTES0
Top