Jump to content
  • 0

[Help] with Delevel NPC


Question

Posted

I think this script is false can someone Help me ? its for Gracia Final!!

 

import sys
from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance
from java.util import Iterator
from net.sf.l2j.gameserver.datatables import SkillTable
from net.sf.l2j			       import L2DatabaseFactory
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

qn = "7105_Delevel"

NPC=[1316188]
GOLDBAR = 3470
QuestId    = 1316188
QuestName   = "Delevel"
QuestDesc   = "custom"
InitialHtml = "1.htm"

print "INFO Loaded: Delevel Manager"

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() < 41 :
		htmltext = "<html><body>Players Lower 40 Level Can't use this Action!</body></html>"

	elif st.getQuestItemsCount(GOLDBAR) < 1 :	
                       		 htmltext = "<html><body>You Need 1 Gold Bar to use this Action!</body></html>"

	else:
		st.getPlayer().setTarget(st.getPlayer())

		if event == "2":
			st.takeItems(GOLDBAR,1)
                                st.getPlayer().getStat().removeExpAndSp((st.getPlayer().getExp() - Experience.LEVEL[st.getPlayer().getStat().getLevel() - 1]),0)
			st.setState(State.COMPLETED)
			return "Delevel Manager: You Get -1 Level"
                                st.exitQuest(1)	


		if htmltext != event:
			st.setState(State.COMPLETED)
			st.exitQuest(1)
	return htmltext


def onTalk (self,npc,player):
   st = player.getQuestState(qn)
   htmltext = "<html><head><body>I have nothing to say to you</body></html>"
   st.setState(State.STARTED)
   return InitialHtml

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

for npcId in NPC:
QUEST.addStartNpc(npcId)
QUEST.addTalkId(npcId)

3 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • I'm looking for someone to remove GameGuard from a game that uses XTRAP. The game no longer uses XTRAP. I have a game server. But the client is kicked from the game after a few minutes of logging in. If I try to remove XTRAP (just by deleting it), the game opens and closes quickly.   Send me a PM. The game is Audition, a dance game.
    • 🎉 L2Dead StuckSub - GRAND OPENING 14 February 2026🎉 After beta, testing, mistakes, laughs and a lot of PvP, the moment has finally come. L2Dead StuckSub is officially opening its gates on 14 February 2026.   ⚔️What to expect: ✦Main Class +6 Stuck Sub system ✦Balanced PvP & custom party farm areas ✦Custom events, bosses and strong rewards ✦Competitive clan scene with castle rewards   📌Until the opening: ✦Create your clans and register them in the Clan-Register channel ✦Invite your friends / old parties / CPs ✦Stay tuned for more information (rates, events, siege times, etc.)   Get your setups ready, prepare your macros and your Discord/voice. On 14 February 2026 20:00 GMT+2, we write the first chapter of L2Dead together. 🔥 https://www.l2dead.com/ https://discord.gg/TGnATuZmdt
    • Please read our rules and include price on your thread.
    • - Main Sorc with 3 more subclasses [ bishop,necromancer,warlock] - MA Robe +3 - DK +5556 - Som +4 [ Active : Stone ] - AM RAR +3 with 150 DARK ATT - Arcana Sigil Shield - Jewels - Replica Orfen x2 Zaken Core Ant Queen x2 - Tatteosian Necklase +3 - Olf +8 / Clock +7 - 4 Top Talismans which you can combain in 1 Gold Talisman Fire wings and Gold Costume Clothes You can check item's here .......
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..