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
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:@darkxnezz Try this one, unpack it to data/npc.
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>
It would be nice if You post yours, so I can check if it'll solve the problem@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
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 commandsWeird, for me everything seems to working perfectly, Legola also. Maybe try this lib.
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>
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!
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
// 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;
}
max="9999"
['max'] = 99999,
try working like thisdid 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
nothingtry working like this
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;
}