Jump to content
  • 0

[Help]Level NPC



13 answers to this question

Recommended Posts

  • 0




* This program is free software: you can redistribute it and/or modify it under

* the terms of the GNU General Public License as published by the Free Software

* Foundation, either version 3 of the License, or (at your option) any later

* version.


* This program is distributed in the hope that it will be useful, but WITHOUT

* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS

* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more

* details.


* You should have received a copy of the GNU General Public License along with

* this program. If not, see <http://www.gnu.org/licenses/>.


package custom.LevelNPC;


import net.sf.l2j.gameserver.instancemanager.QuestManager;

import net.sf.l2j.gameserver.model.actor.L2Npc;

import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

import net.sf.l2j.gameserver.model.base.Experience;

import net.sf.l2j.gameserver.model.quest.Quest;

import net.sf.l2j.gameserver.model.quest.QuestState;

import net.sf.l2j.gameserver.network.clientpackets.Say2;

import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;



* @author Based on idea of SeaNet

* @author lord_rex

* @since ToDay


public class LevelNPC extends Quest


private final static int NPC = 50023;


public LevelNPC(int questId, String name, String descr)


super(questId, name, descr);






public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)


String htmltext = "";

htmltext = npc.getNpcId() + ".htm";

QuestState st = player.getQuestState(getName());


if (event.equalsIgnoreCase("level_me"))


if (st.getPlayer().getLevel() < 1)

st.getPlayer().sendPacket(new CreatureSay(st.getPlayer().getObjectId(), Say2.TELL, "Level NPC", "wtf?"));

else if (st.getQuestItemsCount(57) < 1)

st.getPlayer().sendPacket(new CreatureSay(st.getPlayer().getObjectId(), Say2.TELL, "Level NPC", "You need 10.000.000 adena to add your level."));

else if (st.getPlayer().getKarma() > 0)

st.getPlayer().sendPacket(new CreatureSay(st.getPlayer().getObjectId(), Say2.TELL, "Level NPC", "You are chaotic, go away please!"));

else if (st.getPlayer().getPvpFlag() != 0)

st.getPlayer().sendPacket(new CreatureSay(st.getPlayer().getObjectId(), Say2.TELL, "Level NPC", "You cannot add your level when you are fighting."));

else if (st.getPlayer().isAttackingNow() == true)

st.getPlayer().sendPacket(new CreatureSay(st.getPlayer().getObjectId(), Say2.TELL, "Level NPC", "Leave me please!!!"));





st.takeItems(57, 1);

                                st.getPlayer().getStat().addExpAndSp((st.getPlayer().getExp() - Experience.LEVEL[st.getPlayer().getStat().getLevel() + 84]),0);




return htmltext;



public String onFirstTalk(L2Npc npc, L2PcInstance player)


String htmltext = "";

QuestState st = player.getQuestState(getName());

if (st == null)


Quest q = QuestManager.getInstance().getQuest(getName());

st = q.newQuestState(player);


htmltext = npc.getNpcId() + ".htm";

return htmltext;



public static void main(String[] args)


new LevelNPC(-1, "LevelNPC", "custom");




but not happend.

Link to comment
Share on other sites

  • 0

Try this:


import sys

from net.sf.l2j.gameserver.network.serverpackets import CreatureSay

from java.lang import System

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from net.sf.l2j.gameserver.model.base import Experience

from net.sf.l2j.gameserver.model.quest import State

from net.sf.l2j.gameserver.model.quest import QuestState

from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

from java.util import Iterator

from net.sf.l2j.gameserver.datatables import SkillTable

from net.sf.l2j import L2DatabaseFactory

from net.sf.l2j.gameserver.network.serverpackets import SetupGauge


qn = "7105_Delevel"



MEDAL = 57

QuestId    = 7105

QuestName  = "Delevel"

QuestDesc  = "custom"

InitialHtml = "1.htm"


print "INFO Loaded: Delevel Manager by promo"


class Quest (JQuest) :


def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)



def onEvent(self,event,st):

htmltext = event


if  st.getPlayer().getLevel() < 1 :

st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Ban khong du level!"))


elif st.getQuestItemsCount(MEDAL) < 10000000 :

                      st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Ban khong co du adena !"))


elif st.getPlayer().getKarma() > 0 :

st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Diem karma cua ban qua cao!"))


elif st.getPlayer().getPvpFlag() != 0 :

st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Ban dang trong tinh trang chien dau!"))


elif st.getPlayer().isAttackingNow() == True :

st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Dont hit me, Plz!!!!"))


elif st.getPlayer().getLevel() < 1 :


st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 2, "Delevel Manager", "Ban  khong the su dung tiep tuc neu ban duoi cap 48"))





if event == "2":


                                st.getPlayer().getStat().addExpAndSp((st.getPlayer().getExp() - Experience.LEVEL[st.getPlayer().getStat().getLevel() + 84]),0)

st.getPlayer().sendPacket(CreatureSay(st.getPlayer().getObjectId(), 3, "Delevel Manager", "Ban da duoc giam di 1 level"))

return "1.htm"





if htmltext != event:



return htmltext


def onTalk (self,npc,player):

  st = player.getQuestState(qn)

  htmltext = "<html><head><body> I dont have anything to say .</body></html>"


  return InitialHtml


QUEST      = Quest(QuestId,str(QuestId) + "_" + QuestName,QuestDesc)


for npcId in NPC:




Link to comment
Share on other sites

  • 0

Traceback (innermost last):

  (no code object) at line 0

SyntaxError: ('invalid syntax', ('__init__.py', 57, 33, '                                st.getPlayer().getStat().addExpAndSp((st.getPlayer().getExp() - Experience.LEVEL[st.getPlayer().getStat().getLevel() + 84]),0)'))

Link to comment
Share on other sites

  • 0


<head><title>Delevel Manager</title>



Click here to increase level.<br>




<td align=center><button value="Increase  level " action="bypass -h Quest 7105_Delevel 2" width=264 height=24 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df"></td>




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Posts

    • Hyaluronan Crema Precio Argentina - El tiempo real puede variar dependiendo de otros artículos en su pedido. Para editar, navegue a cualquier página de producto en el sitio y actualice el código PIN en la sección de información de entrega. El valor total del producto debe ser mínimo ₹ 249 para realizar un pedido. Vemos que ha personalizado su experiencia en el sitio agregando la fecha de nacimiento y el sexo de su hijo en el sitio.   Hyaluronan Crema Precio Hyaluronan Crema Página web oficial: https://www.offernutra.com/argentina/hyaluronan-crema-precio-argentina/ Más: https://twitter.com/auroraKleinn https://vimeo.com/774966019 https://www.youtube.com/watch?v=_Hr6xe6-6D8 https://sites.google.com/view/hyaluronan-crema-precio-argent/ https://offernutra.blogspot.com/2022/11/hyaluronan-crema-precio-composicion.html https://techplanet.today/post/hyaluronan-crema-precio-argentina-resenas-precio-ingredientes-beneficios https://www.scoop.it/topic/hyaluronan-crema-precio-argentina/p/4138280405/2022/11/25/hyaluronan-crema-precio-composicion-beneficios-pros-y-contras-en-argentina?&kind=crawled&fId=1440580
    • Derma PGX Cream   Derma PGX Cream   Derma PGX Cream I'm embarrassed to recognize as a correct that I were given it. It changed into no longer till I struck age 50 that I concluded that it changed into the notable possibility in case you need to perform a few element and began out looking big enhancements in my skin. To summarize, I've splendid one single detail to communicate. Your perception may be advanced with the useful perusing skin care exams and empower you to select. What is wonderful is the manner which you need to get your subtleties from the vital enemy of maturing. In this manner, see the nice feasible surveys and pick be correct. These skin contamination flareups can be instead irritating, undesirable and for the maximum detail are pretty finding out to manipulate and neck can be disappointing in particular. Skin can be one's frame and character's photo. Subsequently, you want to take exceptional hobby of one's skin. You need to devour nourishment that could carry together.   https://atozsupplement.com/derma-pgx-cream/ https://dermapgxantiagingcream.company.site/ https://www.facebook.com/getdermapgxantiagingcream/ https://www.provenexpert.com/derma-pgx-cream-anti-aging-cream/ https://educatorpages.com/site/dermapgxantiagingcream/ https://derma-pgx-anti-aging-cream-46.webselfsite.net/ https://dermapgxcream.wixsite.com/anti-aging-cream/ https://derma-pgx-anti-aging-cream.jimdosite.com/ https://shrearm-plierly-snuiengly.yolasite.com/  
    • The most popular web application framework is covered in this blog post.   1.   PLATFORM INDEPENDENCE Any type of application may be developed using any platform thanks to.NET. It supports all platforms and is quite reliant on them. The.NET-based mobile applications will make it easier for all developers to support various operating systems, such as Windows, Android, and iOS. Therefore,.NET supports you with all of the options.   2.   DEVELOPMENT AND SUPPORT FOR LANGUAGE Around 44 different languages are supported by.NET, and you have complete discretion in selecting the language you want to use for your application. You have the advantage of.NET programming being a quick process and having library classes that provide resources for app development.   3.   "ITIES" .NET is called a reliable platform due to the four "ities" features. Due to the four "ities" functionality,.NET is referred to as a trustworthy platform. It primarily assists with the most secure, dependable, scalable, and compatible outsourcing software development solutions.   ·       Because of its consistency and ability to reuse  content management system india components and code for different purposes, the .NET framework is popular. ·       It offers secure apps and is highly secure. ·       Users can build trust in the framework thanks to. Reputation NET's for dependability. ·       With.NET, you have speedy loading times and stability.   4.   A BETTER RESPONSE / PERFORMANCE .NET is renowned for being dependable and quick. Its just-in-time compilation technique performs better and is faster. The fact that it produces outcomes that are responsive is its best feature. With. Dynamic NET's experience and incredibly adaptable methodology, you would be.   5.   COST The combination of the developing environment is excellent. Cost-effectiveness is a crucial aspect that must be taken into account. NET is constructed with the assistance of a Microsoft IDE we are all familiar with called VS express. So if you're a newbie looking for something hard, this is a good option.   6.   EDITORS AND TOOLS Many IDEs support.NET, but only Microsoft Visual Studio allows you to use it. In addition, it costs money but offers a tone of functionality and is one of the most adaptable IDEs.   Beginners may find it challenging, and integrating it with the.NET development process might be challenging. Additionally, because it is developed in C#, it may be challenging for a newbie to understand the C syntax.   7.   COMMUNITY When working on.NET, several developers shared their experiences and difficulties with one another. They have done their very best to respond to any user question that arises during the course of development. Developers from the community are available to provide you with any kind of solution wherever in the world.   TYPES OF .NET TECHNOLOGY DEVELOPMENT According to stats and surveys It is very obvious that the.NET platform's timetable is expected to grow during the next few years.   SOURCE - https://dottutorials.net/stats-surveys-about-net-core-future-2020/   The developer would benefit from these Four categories of.NET applications in their work. ●      Web pages: This type of.NET programming, users can experiment with PHP and HTML. .NET can be used to create web pages with little to no code required thanks to Rapid application mobility.   ●      WebForms: This.NET programming method is helpful for creating dynamic, compact, and intelligently performing applications. Compared to the MVC design, this method of development requires less coding and gives the programmer more control.   ●      MVC: The MVC architecture is one of the elements that has simplified the work of developers. They have the ability to code, compile, and test any component of the application in the model. This usually increases productivity, which directly impacts the users of the project. The developer does not have to constantly think about IsPostBack & ViewState while working with this framework. They can build apps using this to streamline their workflow, which increases productivity. ●      Excellent UI Control: Microsoft includes an excellent UI to enhance the application in the.NET framework. In order to create the greatest application possible, it also enables us to have access to third-party controls. One of the third-party controls, Telerik, facilitates drag and drop operations and thus helps developers save time.   Reasons to Choose .NET Development The Common Language Runtime (CLR) and Class Library are two framework components that are commonly held by the.NET framework (FCL). An efficient user interface, web application development, network connections, and database connectivity are all delivered to the audience through the FCL.   In accordance with a survey. One of the most desired, feared, and loved frameworks of 2019 is NET. It only alludes to the developers' desire to activate. Other frameworks can't compare to Net Core's extensive features and capabilities.     The CLR form is the one that necessitates preservation, memory  cms developers india management, and exception handling. The developers create the mobile or web application by integrating the code with the.NET framework.   In the Nutshell The market for.NET is increasing thanks to new features and product releases. It is now the public face of all web applications. Whether the user intends to create a mobile application, a dynamic website, or perhaps business development applications. We therefore hope that this post has given you all the advice and information you need to engage web developers who are knowledgeable about.NET technology and its services.   The.NET framework has a large development community and offers language support.   When it comes to the creation of applications, it has more advantages than disadvantages. Due to this, both small businesses and established corporations choose to create reliable applications using.NET.
  • Topics

  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock