• 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 can reproduce that?
vEUCiFz.png


So it's a 500 items limit when you trade with any npc?
1kpEVTd.png

to prevent people from abusing npc by buying millions of items at once...

but u can change this if u want

open behaviourdatabase.cpp

look for function searchDigit

C++:
if (value > 500) {
        value = 500;
    }
 
to prevent people from abusing npc by buying millions of items at once...

but u can change this if u want

open behaviourdatabase.cpp

look for function searchDigit

C++:
if (value > 500) {
        value = 500;
    }
Ok, I got it
How can I get rid off that limit only on bank npc?
 
You're quoting the answer to that question...
I mean if it's another way to manage that instead of using %1 to change more than 500 coins at a time, but keeping the npc limit on 500 items to trade.
Code:
Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96

BTW, how it can be abused if I delete or comment those lines?:
Code:
if (value > 500) {
        value = 500;
    }
 
Last edited:
I mean if it's another way to manage that instead of using %1 to change more than 500 coins at a time, but keeping the npc limit on 500 items to trade.
Code:
Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96

BTW, how it can be abused if I delete or comment those lines?:
Code:
if (value > 500) {
        value = 500;
    }

The server would collapse, there are many items worth nothing, and lets say a player with 1kk or more and buys something from the NPC, the server freezes for over 1 minute, that's why CipSoft has this limit.
 
The server would collapse, there are many items worth nothing, and lets say a player with 1kk or more and buys something from the NPC, the server freezes for over 1 minute, that's why CipSoft has this limit.
I want to keep the npc trade limit on 500 items, I only ask for another method to change more than 500 gold on bank npc.
 
I want to keep the npc trade limit on 500 items, I only ask for another method to change more than 500 gold on bank npc.
Code:
Player: hi
19:37 Rokyn: Hiho, Hiho, Player! What can I do for you?
Player: change gold
19:37 Rokyn: How many platinum coins do you want to get?
Player: 6
19:37 Rokyn: So I should change 600 of your gold coins to 6 platinum coins for you?
Player: yes
19:38 Rokyn: Here you are.
 
Code:
Player: hi
19:37 Rokyn: Hiho, Hiho, Player! What can I do for you?
Player: change gold
19:37 Rokyn: How many platinum coins do you want to get?
Player: 6
19:37 Rokyn: So I should change 600 of your gold coins to 6 platinum coins for you?
Player: yes
19:38 Rokyn: Here you are.
hhUTngc.png


I'm working on bank system too and now you can't deposit or withdraw more than 500 gold at a time with that limit.
 
Maybe you can simply check if count > 500 but is not currency?
Nostalrius is not TFS in this case, there is a behaviourdatabase.cpp to manage that:
Code:
int32_t BehaviourDatabase::searchDigit(const std::string& message)
{
    int32_t start = -1;
    int32_t end = -1;
    int32_t value = 0;
    int32_t i = -1;

    for (char c : message) {
        i++;
        if (start == -1 && IsDigit(c)) {
            start = i;
        }
        else if (start != -1 && !IsDigit(c)) {
            end = i;
            break;
        }
    }

    try {
        value = std::stoi(message.substr(start, end).c_str());
    }
    catch (std::invalid_argument) {
        return 0;
    }
    catch (std::out_of_range) {
        return 0;
    }

    if (value > 500) {
        value = 500;
    }

    return value;
}
 
Oh I see.

Probably not the best solution, but maybe you could remove the statement checking if value is above 500 from searchDigit function, then use standard library to check max value every time that function is called with exception for currency items (when you can fetch these item ids). Something like: std::max<uint64_t>(searchDigit(parameter), 500)
 
Last edited:
Oh I see.

Probably not the best solution, but maybe you could remove the statement checking if value is above 500 from searchDigit function, then use standard library to check max value every time that function is called with exception for currency items (when you can fetch these item ids). Something like: std::max<uint64_t>(searchDigit(parameter), 500)
The problem itself it's the dialog, you can't check for currency when you talk to npc like that:
hhUTngc.png

The only workaround I can imagine is to use something different on bank npc than %1:
Code:
Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96
But I'm stucked now.
 
I found nostalrius sources with cast system here.

 
The problem itself it's the dialog, you can't check for currency when you talk to npc like that:
hhUTngc.png

The only workaround I can imagine is to use something different on bank npc than %1:
Code:
Topic=91,%1,0<%1 -> Amount=%1*100, Price=%1, "So I should change %A of your gold coins to %P platinum coins for you?", Topic=96
But I'm stucked now.
you can maybe try to edit how db behaviour read the message just for this bank boys
 
Would it be a big deal to change this so that you can actually easily modify outfits?

How big a deal is it to re-implement the outfits.xml?

Why remove that in the first place exactly?
 
Back
Top