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

Nostalrius 7.7

Anyone get this when trying to start the exe?

PANIC: unprotected error in call to Lua API (attempt to index a nil value)
 
1. Compile in debug configuration
2. Attach debugger to the process
3. ctrl + alt + e
4. check all c++ exceptions
5. debug it

good luck

to understand the gmp.h issue refer to this:
what is it -> GNU Multiple Precision Arithmetic Library - Wikipedia (https://en.wikipedia.org/wiki/GNU_Multiple_Precision_Arithmetic_Library)
why is there a difference between tfs and nostalrius -> Load RSA private key from PEM file (#2496) · otland/forgottenserver@1e044c4 (https://github.com/otland/forgottenserver/commit/1e044c4c4ea45f674d75d7b56c9086f6fd9e65d7#diff-90b1b9102332d1eeff752b383ae9b75e77c2d0bf19fd0b64e9400066edc9931c)
 
Last edited:
Great, now open the callstack and trace the issue.
 
Maybe ill wait for someone that knows the issue seems I know this code has been compiled and works.
 
A little doubt. I have studied many other servers with this one. If someone who has been around for longer can answer, I appreciate it.

Is Pits of Inferno working? Did it already exist in version 7.72?
 
A little doubt. I have studied many other servers with this one. If someone who has been around for longer can answer, I appreciate it.

Is Pits of Inferno working? Did it already exist in version 7.72?
7.9
 
when say 14 to npc it triggers "$4", even tho "$14" don't exist, anyone has a clue to prevent that?
C++:
bool BehaviourDatabase::searchWord(const std::string& pattern, const std::string& message)
{
    if (pattern.empty() || message.empty()) {
        return false;
    }

    size_t len = pattern.length();
    bool wholeWord = false;

    if (pattern[len - 1] == '$') {
        len--;
        wholeWord = true;
    }

    std::string newPattern = pattern.substr(0, len);
    std::string actualMessage = asLowerCaseString(message);

    if (actualMessage.find(newPattern) == std::string::npos) {
        return false;
    }

    if (wholeWord) {
        size_t wordPos = actualMessage.find(newPattern);
        size_t wordEnd = wordPos + newPattern.length() - 1;

        if (wordEnd + 1 > actualMessage.length()) {
            return false;
        }

        if (wordEnd + 1 == actualMessage.length()) {
            return true;
        }

        if (!isspace(actualMessage[wordEnd + 1])) {
            return false;
        }
    }

    return true;
}
 
when say 14 to npc it triggers "$4", even tho "$14" don't exist, anyone has a clue to prevent that?
C++:
bool BehaviourDatabase::searchWord(const std::string& pattern, const std::string& message)
{
    if (pattern.empty() || message.empty()) {
        return false;
    }

    size_t len = pattern.length();
    bool wholeWord = false;

    if (pattern[len - 1] == '$') {
        len--;
        wholeWord = true;
    }

    std::string newPattern = pattern.substr(0, len);
    std::string actualMessage = asLowerCaseString(message);

    if (actualMessage.find(newPattern) == std::string::npos) {
        return false;
    }

    if (wholeWord) {
        size_t wordPos = actualMessage.find(newPattern);
        size_t wordEnd = wordPos + newPattern.length() - 1;

        if (wordEnd + 1 > actualMessage.length()) {
            return false;
        }

        if (wordEnd + 1 == actualMessage.length()) {
            return true;
        }

        if (!isspace(actualMessage[wordEnd + 1])) {
            return false;
        }
    }

    return true;
}

You have to put $ at the end of the keyword, not at the beginning.
 
You have to put $ at the end of the keyword, not at the beginning.
yeah true, i misstyped it here on otland, the files have $ at the end as you said, and it doesn't work regardless
 
Anyone got the right schema for this? I cannot upload the database idk what im doing wrong :/
 
Exist any working war system for this distribution?

Exist any working war system for this distribution?

Worked for me with little fix
 
How can I check the vocation ids? For example. In items.srv, I edit Vocations = x for some items, but only some of the items needed for this vocation restriction.
 
Vocat
How can I check the vocation ids? For example. In items.srv, I edit Vocations = x for some items, but only some of the items needed for this vocation restriction

Vocations.xml, xml data folder
 
I have already discovered all the ids testing one by one. For example ITEM ID FOR SORCERER and paladin is id: 5.

I noticed that all items offer attributes, even if I seven correctly in ITEMS. SRV, the vocation restriction does not work. Should I add something more in movements.xml in this case?

Example of a boot:

Lua:
<movevent event = "Equip" itemid = "3079" slot = "feet" function = "onEquipItem" />
<movevent event = "DeEquip" itemid = "3079" slot = "feet" function = "onDeEquipItem" />
 
Back
Top