Ragno
Retired Staff
- Messages
- 133
- Points
- 0
- Github
- AtlantisRO
- Emulator
Almost all the npcs makes checkweight checks prior to give items to players, but there are still some others that misses this checkquest and produces error in player's quest.
As an example, not too long it was added a custom checkweight to quest_13_2.txt script to avoid issues in player's quest when inventory is full.
So, what about introducing a global function to bring a generical checkweight to add to npcs with this problems? Generical message is this:
if (checkweight(Knife,1) == 0 || MaxWeight - Weight < 1000) {
mes "- Currently you're carrying -";
mes "- too many items with you. -";
mes "- Please try again after you -";
mes "- lose some weight. -";
close;
}
And it also can be added an aditional argument to set specific weight values to check. This way it could bring easily those checks and also have a quick reference to know that check is custom.
As an example, not too long it was added a custom checkweight to quest_13_2.txt script to avoid issues in player's quest when inventory is full.
So, what about introducing a global function to bring a generical checkweight to add to npcs with this problems? Generical message is this:
if (checkweight(Knife,1) == 0 || MaxWeight - Weight < 1000) {
mes "- Currently you're carrying -";
mes "- too many items with you. -";
mes "- Please try again after you -";
mes "- lose some weight. -";
close;
}
And it also can be added an aditional argument to set specific weight values to check. This way it could bring easily those checks and also have a quick reference to know that check is custom.