Level limit on maps [HELP]

07/01/2022 16:37 NosNight#1
Hello, I want to put a level limit on the maps. For example, when I reach the 20th level in Nosville, I want no more exp, how can I do it?
07/01/2022 22:11 Limoo#2
Put an NPC that says "MAX LV 20 or BAN"
07/01/2022 22:58 XV50#3
Smartest way is to add byte LevelRequired to PortalDTO and then just do 1 simple check.

You can either check if the EXP/Drop should be blocked or use the MonsterBonus Generation and check if LevelRequired is equal or higher/lower and then so the work.

Or use the PortalHandler and do the same check there to block the entry
07/01/2022 22:59 Fizo55#4
Preq packet ->

if (session.character.level < 20 && packet.destmapinstance.mapid == 1)
{
session.sendpacket(session.generatemsg("gneugneu", 0));
return;
}

then you can't access to the map without reaching a specific level or

GenerateMonsterBonus ->

Search for GenerateXp ->

if (session.character.level < 20 && session.currentmapinstance.mapid == 1)
{
GenerateXp();
}

then no more xp

both ways are not clean but still do the work :)
07/02/2022 12:26 g3stapo#5
Quote:
Originally Posted by XV50 View Post
Smartest way is to add byte LevelRequired to PortalDTO and then just do 1 simple check.

You can either check if the EXP/Drop should be blocked or use the MonsterBonus Generation and check if LevelRequired is equal or higher/lower and then so the work.

Or use the PortalHandler and do the same check there to block the entry
make a nostale moba
07/02/2022 12:29 XV50#6
Quote:
Originally Posted by g3stapo View Post
make a nostale moba
League of NosVille
07/02/2022 13:48 g3stapo#7
Quote:
Originally Posted by XV50 View Post
League of NosVille
i will provide a map