• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Training skills with training monk recive less skills

newby

Active Member
Joined
Jun 11, 2016
Messages
183
Reaction score
43
2. Spamming / Double post: You may not repeat the same message multiple times. It is seen as spamming, and will be deleted. If you accidentally post the same content twice, report one of the duplicate posts so a moderator can delete or merge that post.
To incentive players to train at risk to be dead, with summons like old times

I want to change in my server to if player is targetting/training with a training monk he recive skills/2, i mean 2x more slower

I found it on forum a long time ago and couldnt find anymore...

The topic i saw take changes on sources so, my sources are: Fir3element/3777 (https://github.com/Fir3element/3777/tree/master/src)

bump

bump

bump

bump

bump

bump

bump
 
Last edited:
I recently asked for a solution to this to have your rates go 2x faster.

My idea was that when the player stood on the training room tiles they would have 2x skill gain rate.

This is the topic: [REQUEST] Training Monk tiles give faster skill gain rates. (https://otland.net/threads/request-training-monk-tiles-give-faster-skill-gain-rates.265472/)

Perhaps it could be an alternative to what you're looking for, just gotta convert to tfs 0.x

I saw your topic, but what i asked for is just instead
If target a Training Monk recive 2x less skills any other train method should gain normal skills

I think it is not possible to do on LUA
 
Lua:
function Player:onGainSkillTries(skill, tries)
    if APPLY_SKILL_MULTIPLIER == false then
        return tries
    end

    -- Training Room Tile
    local tile = self:getTile()
    local ground = tile and tile:getGround()
    if ground and ground.actionid == 9000 then -- change 9000 to whatever action id you set the tiles to
        tries = math.floor(tries * 2) -- example: 2x skill rate
    end

    if skill == SKILL_MAGLEVEL then
        return tries * configManager.getNumber(configKeys.RATE_MAGIC)
    end
    return tries * configManager.getNumber(configKeys.RATE_SKILL)
end

Except from using 2x multiplier you would use 0.5 instead. Then in your map editor the tile the player stands on when training just give it the action id of whatever you put on line 9.

Of course this script is for tfs 1.x so like I've already mentioned all you'd have to do is edit it to work on your version.
 
LOL i didn't think about use 0.5, it's a pretty nice good idea to make it work

But it still with the main problem on this thread...

Where the fuck is the function who works like onGainSkillTries 1.0 on 0.4
:D

The only thing i found was in: Fir3element/3777 (https://github.com/Fir3element/3777/blob/2a3447b6be9930c45340e9df726a66d686a225a3/data/lib/050-function.lua)

It looks like add the entire skill level:
Code:
function doPlayerAddSkill(cid, skill, amount, round)
    if(skill == SKILL__LEVEL) then
        return doPlayerAddLevel(cid, amount, round)
    elseif(skill == SKILL__MAGLEVEL) then
        return doPlayerAddMagLevel(cid, amount)
    end

    return doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))
end

Is anyone know it?
 
Back
Top