• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Loyalty System, add skill % tries

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
Hello everyone,

I am working currently at a loyalty system same as CipSoft (http://tibia.wikia.com/wiki/Loyalty_System). This system consist about you getting "loyalty days" for each day that you have been premium and will keep adding as you are premium. This system add a bonus on your base skills, also a tittle. I have done this part so far. But I got some problems adding this base bonus.

What I know: I have reading TFS 1.2 compat.lua script and found this

Code:
function doPlayerAddSkillTry(cid, skillid, n) local p = Player(cid) return p ~= nil and p:addSkillTries(skillid, n * configManager.getNumber(configKeys.RATE_SKILL)) or false end

Lets asume we already have the variable "bonus" with the respective percent according to your "loyalty days".

So basically it should be (for skillId 1 - I don't even remember which skill this was hahah):

Code:
 ...
local bonus = 1.05
local formula = getPlayerSkill(cid, 1)*bonus
doPlayerAddSkillTry(player,1,formula)
...

Would this be sufficient to be added at login.lua and "bypass" any trouble with offline trainer?

PD: Asking cause has been out of OTs for some years and I feel rusty.
 
What is that System, provide me link and I may take a look.

Here is a sample, the system is totally custom http://i63.tinypic.com/2itt27d.gif

Use a catalyst together with some ore as iron ores and you get a class object like the one seen in the gif, when you right click open the modal window and well, the rest is shown there haha

This system I bought it and the sample is one that the creator has since it is the most accessible that I had at the moment.

Excuse my English, I'm not very good with the
 
Last edited:
When you recreate the formula to addSkill just add the skill of your system too there.

The thing is that when I add the line in the actions/blacksmith.lua it throws me an error in the console

mmvRpgNPTtyVNJFZsz8GKg.png

ZyVZ3QcoTE2e1c72euaL1A.png
 
Back
Top