Disabled newbie buffs via Character.ini MaxNewbieBuffLevel config.

This commit is contained in:
MobiusDev 2017-07-31 21:32:08 +00:00
parent 665523f7d9
commit f831d5df04
7 changed files with 39 additions and 17 deletions

View File

@ -710,6 +710,7 @@ MaxFreeTeleportLevel = 0
# Max player level for free newbie buffs.
# Default: 0 (Disabled)
# Enabled: 40
MaxNewbieBuffLevel = 0
# Allow character deletion after days set below. To disallow character deletion, set this equal to 0.

View File

@ -1,7 +1,7 @@
<html><body>Newbie Guide:<br>
If you need advice, please do not hesitate to ask me! I'll try my very best to help you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NewbieGuide 1">Ask for advice.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest NpcLocationInfo">NPC location information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/SupportMagic.htm">Check list of available support magic.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NpcLocationInfo">NPC location information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
</body></html>

View File

@ -1,7 +1,7 @@
<html><body>Newbie Guide:<br>
Don't hesitate to tell me if you require assistance. I can teach you about a number of useful things.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NewbieGuide 1">Ask for advice.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
</body></html>

View File

@ -1,7 +1,7 @@
<html><body>Newbie Guide:<br>
If you need advice, do not hesitate to ask me! I will do my very best to help you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NewbieGuide 1">Ask for advice.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
</body></html>

View File

@ -1,7 +1,7 @@
<html><body>Newbie Guide:<br>
Can I help you with anything? Eh? Well, then, what would you like to know?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NewbieGuide 1">Ask for advice.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
</body></html>

View File

@ -1,7 +1,7 @@
<html><body>Newbie Guide:<br>
You wish to grow strong and powerful, Eh? Then listen carefully; I will advice you!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NewbieGuide 1">Ask for advice.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest NpcLocationInfo">NPC Location Information.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/BlessingOfProtection.htm">Receive blessing of protection.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Link default/SupportMagic.htm">Receive help from beneficial magic.</Button>
</body></html>

View File

@ -22,6 +22,7 @@ import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jmobius.gameserver.network.serverpackets.PlaySound;
import ai.AbstractNpcAI;
@ -46,6 +47,7 @@ public class NewbieGuide extends AbstractNpcAI
// Other
private final static String TUTORIAL_QUEST = "Q00255_Tutorial";
private final static String TUTORIAL_SHOT_VAR = "TUTORIAL_SHOT_REWARDED";
private final static String SUPPORT_MAGIC_STRING = "<Button ALIGN=LEFT ICON=\"NORMAL\" action=\"bypass -h Link default/SupportMagic.htm\">Receive help from beneficial magic.</Button>";
private NewbieGuide()
{
@ -60,7 +62,18 @@ public class NewbieGuide extends AbstractNpcAI
String htmltext = null;
if (event.equals("0"))
{
htmltext = npc.getId() + ".htm";
if (Config.MAX_NEWBIE_BUFF_LEVEL > 0)
{
htmltext = npc.getId() + ".htm";
}
else
{
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
html.setFile(player.getHtmlPrefix(), "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
html.replace(SUPPORT_MAGIC_STRING, "");
player.sendPacket(html);
return htmltext;
}
}
else
{
@ -91,7 +104,15 @@ public class NewbieGuide extends AbstractNpcAI
{
return npc.getId() + "-no.htm";
}
return npc.getId() + ".htm";
if (Config.MAX_NEWBIE_BUFF_LEVEL > 0)
{
return npc.getId() + ".htm";
}
final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
html.setFile(player.getHtmlPrefix(), "data/scripts/ai/others/NewbieGuide/" + npc.getId() + ".htm");
html.replace(SUPPORT_MAGIC_STRING, "");
player.sendPacket(html);
return null;
}
public void playTutorialVoice(L2PcInstance player, String voice)