• 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!

The Forgotten Tibia (no vocations, new skills, skills by points, dual wield, auto loot, quiver, etc)

How to get NPCs to work properly? They are visible only if you set them "default.lua" script.
 
You are having a npc lib problem.
Are you using custom npcs?
 
No, I even had problems with npcs which were already in datapack. I'll be on my pc in a moment and I'll give You an example.
Post automatically merged:

Ok, so for example when I deliver 100 minotaur leathers to Lubo for addon he did an addon backpack for me but he didn't take my 100 minotaur leather from my backpack and I still have it. Even if I have this doPlayerRemoveItem(cid,5878,100, true) in my lua file.

Anotrher case is with Legola NPC for example. Because when her lua is set to Legola.lua I cannot spawn her with command "/s Legola" and in my console this error appears:
Lua:
Lua Script Error: [Npc interface]
data/npc/scripts/Legola.lua
data/npc/scripts/Legola.lua:11: attempt to index global 'VoiceModule' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/npc/scripts/Legola.lua:11: in main chunk
        [C]: in function 'createNpc'
        data/talkactions/scripts/place_npc.lua:11: in function <data/talkactions/scripts/place_npc.lua:1>
[Warning - NpcScript::NpcScript] Can not load script: Legola.lua
cannot open data/npc/scripts/steamship_cormaya.lua: No such file or directory

TBH I don't know what this "steamship_cormaya.lua" has to do with Legola. Weird...

Also when the map is loading there are many monsters like Vexclaw or Hellflayer that are placed somewhere on the map but they aren't in the data pack monsters folder and it also causing some kind of an error in the console: [Spawn::addMonster] Can not find Vexclaw or [Spawn::addMonster] Can not find Seacrest Serpent and so on.
 
Last edited:
@Togu Your lib is out of date. With the last merge in your repo.

@darkxnezz try using the lib provided in the oficial git of tfs.
Voice modules are not supported in togu's npc lib.
I can share mine in a few hours
 
@darkxnezz Try this one, unpack it to data/npc.
I did what You suggested, still can't spawn Legola and also now when I type "hi" to any NPC then i get this in my console:

Lua:
Lua Script Error: [Main Interface]
in a timer event called from:
(Unknown scriptfile)
data/npc/lib/npcsystem/npchandler.lua:656: attempt to call global 'getTibianTime' (a nil value)
stack traceback:
        [C]: in function 'getTibianTime'
        data/npc/lib/npcsystem/npchandler.lua:656: in function <data/npc/lib/npcsystem/npchandler.lua:648>
Post automatically merged:

@Togu Your lib is out of date. With the last merge in your repo.

@darkxnezz try using the lib provided in the oficial git of tfs.
Voice modules are not supported in togu's npc lib.
I can share mine in a few hours
It would be nice if You post yours, so I can check if it'll solve the problem ;)
 
Last edited:
Weird, for me everything seems to working perfectly, Legola also. Maybe try this lib.
yes, now I can spawn her. But another error occured with Elane this time. I can only say "hi" to her, she does not respond to other commands

Lua:
Lua Script Error: [Npc interface]
data/npc/scripts/Elane.lua:onCreatureSay
data/npc/scripts/Elane.lua:16: attempt to index global 'Storage' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/npc/scripts/Elane.lua:16: in function 'callback'
        data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay'
        data/npc/scripts/Elane.lua:7: in function <data/npc/scripts/Elane.lua:7>
 
Pretty nice project! This has support to game store module?

Code:
Player No Build had negative mana or more then manaMax while refreshing stats!
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged in.
> Broadcasted message: "New record: 1 players are logged in.".
[Error - Game::playerSetSkillsRequest] Player No Build (10 points) tried to apply skills without having enough total points (2 needed).
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged out.
Saved player: 1 No Build
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged in.
No Build has logged out.

Player God had negative skillpoints or more then his total while setting skills! 
Player God had negative mana or more then manaMax while refreshing stats!

Im getting this error when putting some points in attributes, someone knows how to fix it?
 
if u are gonna make changes into skills.xml you also need to change modules/gamelib/const.lua
Code:
Player No Build had negative mana or more then manaMax while refreshing stats!
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged in.
> Broadcasted message: "New record: 1 players are logged in.".
[Error - Game::playerSetSkillsRequest] Player No Build (10 points) tried to apply skills without having enough total points (2 needed).
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged out.
Saved player: 1 No Build
Player No Build had negative health or more then healthMax while refreshing stats!
No Build has logged in.
No Build has logged out.

Player God had negative skillpoints or more then his total while setting skills!
Player God had negative mana or more then manaMax while refreshing stats!

Im getting this error when putting some points in attributes, someone knows how to fix it?
 
if u are gonna make changes into skills.xml you also need to change modules/gamelib/const.lua

Hey, thanks for the reply.
I'm trying to remove the limit, already edited on source (player.cpp)
Code:
// set maximum values for level 41 to 60
    if (this->level >= 41) {
        maxMagic         = 999;
        maxVitality     = ceil( std::max( this->level * 1.2 + 12.8 + 8, this->level * 1.0) );
        maxStrenght     = maxVitality;
        maxIntelligence = maxVitality;
        maxDexterity     = maxVitality;
        maxDefence         = maxVitality;
        maxEndurance     = maxVitality;
    }
fixed at skills.xml:
Lua:
 max="9999"
and in client, const.lua:
Lua:
['max'] = 99999,

but, still getting 02:21 The maximum magic at your level is 43, at level 43.

Could you help me? Thanks
 
did u changed the xml file aswell?
do u want me to share my player.cpp with you?/
so you can see what i changed?


Lua:
// set maximum value for level 81 or more
    if (this->level >= 81) {
        maxMagic         = ceil(this->level * 1);
        maxVitality     = ceil(this->level * 1);
        maxStrenght     = ceil(this->level * 1);
        maxDexterity     = ceil(this->level * 1);
        maxDefence         = ceil(this->level * 1);
        maxEndurance     = ceil(this->level * 1);
    }

this is what i did + the other formulas.
the * 1 is kinda weird you can ignore.
this will ca your points at your current level
try working like this
 
try working like this
nothing :(
Post automatically merged:

I noticed something strange, even if I modify this text in the source, it appears in the old format.

Code:
if (magic > maxMagic) {
        std::string message = "Test at your level is " + std::to_string((uint32_t) maxMagic) + ".";
        this->sendTextMessage(MESSAGE_STATUS_WARNING, message);
        checks = false;
    }

but still, 03:10 The maximum magic at your level is 71.
 
ceil(this->level * 1);
this mean you can only have the same amount of stat points as your total level in each category.
if you want to remove that cap, just edit the multiplier
 
I wish I could remember the code to help you but unfortunately I don’t have time to work on it and consequently I don’t remember anything from the code.
 
Back
Top