Jump to content
  • 0

Help-custom npc


Question

Posted

Paidia prospa8isa na ftiaksw ena diko mou custom npc gia na ginesai noblesse amesws.

Omws otan pataw de ginetai tpt....

Mou bgazei mono ayto:You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.

To A------ einai to item,apla de 8elw na to deite :P

 

 

# Made by parizakis

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.actor.appearance import PcAppearance

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

from net.sf.l2j.gameserver.model.actor.appearance import PcAppearance

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

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

 

qn = "60000_NoblesseMaster"

 

NPC=[60000]

A------= -----

QuestId    = 60000

QuestName  = "NoblesseMaster"

QuestDesc  = "custom"

InitialHtml = "60000-0.htm"

 

print "INFO Loaded: Possessor Of Noblesse"

 

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() < 80 :

htmltext = "60000-2.htm"

 

                elif st.getPlayer().isNoble() == 1 :

htmltext = "60000-3.htm"

 

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

htmltext = "60000-2.htm"

 

                else:

st.getPlayer().setTarget(st.getPlayer())

 

if event == "2":

                                st.getPlayer().setNoble(True)

                                st.giveItems(A-----,1)

                                st.playSound("ItemSound.quest_finish")

st.setState(State.COMPLETED)

return "60000-1.htm"

                                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><body>You don't meet this NPC's minimum requirements.</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)

 

5 answers to this question

Recommended Posts

  • 0
Posted

file egw ayto ama sou kanei kalos...

 

241_PossessorOfAPreciousSoul_1

 

# Made by disKret
import sys
from com.l2jarchid.gameserver.model.quest import State
from com.l2jarchid.gameserver.model.quest import QuestState
from com.l2jarchid.gameserver.model.quest.jython import QuestJython as JQuest

qn = "241_PossessorOfAPreciousSoul_1"

#NPC
STEDMIEL = 30692
GABRIELLE = 30753
GILMORE = 30754
KANTABILON = 31042
NOEL = 31272
RAHORAKTI = 31336
TALIEN = 31739
CARADINE = 31740
VIRGIL = 31742
KASSANDRA = 31743
OGMAR = 31744

#QUEST ITEM
LEGEND_OF_SEVENTEEN = 7587
MALRUK_SUCCUBUS_CLAW = 7597
ECHO_CRYSTAL = 7589
POETRY_BOOK = 7588
CRIMSON_MOSS = 7598
RAHORAKTIS_MEDICINE = 7599
LUNARGENT = 6029
HELLFIRE_OIL = 6033
VIRGILS_LETTER = 7677
NOBLESS_TIARA = 7694
#CHANCE
CHANCE_FOR_QUEST_ITEMS = 100

#MOB
BARAHAM = 27113

class Quest (JQuest) :

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

def onEvent (self,event,st) :
   htmltext = event
   cond = st.getInt("cond")
   if event == "31739-4.htm" :
     if cond == 0 and st.getPlayer().isSubClassActive() :
       st.set("cond","0")
       st.getPlayer().setNoble(True)
       st.giveItems(NOBLESS_TIARA,1)
       st.playSound("ItemSound.quest_finish")
       st.setState(COMPLETED)

   if event == "30753-2.htm" :
     if cond == 1 and st.getPlayer().isSubClassActive() :
       st.set("cond","2")
       st.playSound("ItemSound.quest_middle")
   if event == "30754-2.htm" :
     if cond == 2 and st.getPlayer().isSubClassActive() :
       st.set("cond","3")
       st.playSound("ItemSound.quest_middle")
   if event == "31739-8.htm" :
     if cond == 4 and st.getPlayer().isSubClassActive() :
       st.set("cond","5")
       st.takeItems(LEGEND_OF_SEVENTEEN,1)
       st.playSound("ItemSound.quest_middle")
   if event == "31042-2.htm" :
     if cond == 5 and st.getPlayer().isSubClassActive() :
       st.set("cond","6")
       st.playSound("ItemSound.quest_middle")
   if event == "31042-5.htm" :
     if cond == 7 and st.getPlayer().isSubClassActive() :
       st.set("cond","8")
       st.takeItems(MALRUK_SUCCUBUS_CLAW,10)
       st.giveItems(ECHO_CRYSTAL,1)
       st.playSound("ItemSound.quest_middle")
   if event == "31739-12.htm" :
     if cond == 8 and st.getPlayer().isSubClassActive() :
       st.set("cond","9")
       st.takeItems(ECHO_CRYSTAL,1)
       st.playSound("ItemSound.quest_accept")
   if event == "30692-2.htm" :
     if cond == 9 and st.getPlayer().isSubClassActive() :
       st.set("cond","10")
       st.giveItems(POETRY_BOOK,1)
       st.playSound("ItemSound.quest_accept")
   if event == "31739-15.htm" :
     if cond == 10 and st.getPlayer().isSubClassActive() :
       st.set("cond","11")
       st.takeItems(POETRY_BOOK,1)
       st.playSound("ItemSound.quest_accept")
   if event == "31742-2.htm" :
     if cond == 11 and st.getPlayer().isSubClassActive() :
       st.set("cond","12")
       st.playSound("ItemSound.quest_accept")
   if event == "31744-2.htm" :
     if cond == 12 and st.getPlayer().isSubClassActive() :
       st.set("cond","13")
       st.playSound("ItemSound.quest_accept")
   if event == "31336-2.htm" :
     if cond == 13 and st.getPlayer().isSubClassActive() :
       st.set("cond","14")
       st.playSound("ItemSound.quest_accept")
   if event == "31336-5.htm" :
     if cond == 15 and st.getPlayer().isSubClassActive() :
       st.set("cond","16")
       st.takeItems(CRIMSON_MOSS,5)
       st.giveItems(RAHORAKTIS_MEDICINE,1)
       st.playSound("ItemSound.quest_accept")
   if event == "31743-2.htm" :
     if cond == 16 and st.getPlayer().isSubClassActive() :
       st.set("cond","17")
       st.takeItems(RAHORAKTIS_MEDICINE,1)
       st.playSound("ItemSound.quest_accept")
   if event == "31742-5.htm" :
     if cond == 17 and st.getPlayer().isSubClassActive() :
       st.set("cond","18")
       st.playSound("ItemSound.quest_accept")
   if event == "31740-2.htm" :
     if cond == 18 and st.getPlayer().isSubClassActive() :
       st.set("cond","19")
       st.playSound("ItemSound.quest_accept")
   if event == "31272-2.htm" :
     if cond == 19 and st.getPlayer().isSubClassActive() :
       st.set("cond","20")
       st.playSound("ItemSound.quest_accept")
   if event == "31272-5.htm" :
     if cond == 20 and st.getPlayer().isSubClassActive() :
       st.takeItems(LUNARGENT,5)
       st.takeItems(HELLFIRE_OIL,1)
       st.set("cond","21")
       st.playSound("ItemSound.quest_accept")
   if event == "31740-5.htm" :
     if cond == 21 and st.getPlayer().isSubClassActive() :
       st.giveItems(VIRGILS_LETTER,1)
       st.set("cond","0")
       st.playSound("ItemSound.quest_finish")
       st.setState(COMPLETED)
   return htmltext

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

   npcId = npc.getNpcId()
   id = st.getState()
   if npcId != TALIEN and id != STARTED : return htmltext

   cond = st.getInt("cond")
   id = st.getState()
   if id == CREATED :
     st.set("cond","0")
   if st.getPlayer().isSubClassActive() :
     if npcId == TALIEN :
       if cond == 0 :
         if id == COMPLETED :
           htmltext = "<html><head><body>This quest have already been completed.</body></html>"
         elif st.getPlayer().getLevel() < 50 : 
           htmltext = "31739-2.htm"
           st.exitQuest(1)
         elif st.getPlayer().getLevel() >= 50 :
           htmltext = "31739-1.htm"
       if cond == 1 :
         htmltext = "31739-5.htm"
       if cond == 4 and st.getQuestItemsCount(LEGEND_OF_SEVENTEEN) == 1 :
         htmltext = "31739-6.htm"
       if cond == 5 :
         htmltext = "31739-9.htm"
       if cond == 8 and st.getQuestItemsCount(ECHO_CRYSTAL) == 1 :
         htmltext = "31739-11.htm"
       if cond == 9 :
         htmltext = "31739-13.htm"
       if cond == 10 and st.getQuestItemsCount(POETRY_BOOK) == 1 :
         htmltext = "31739-14.htm"
       if cond == 11 :
         htmltext = "31739-16.htm"
     if npcId == GABRIELLE :
       if cond == 1 :
         htmltext = "30753-1.htm"
       if cond == 2 :
         htmltext = "30753-3.htm"
     if npcId == GILMORE :
       if cond == 2 :
         htmltext = "30754-1.htm"
       if cond == 3 :
         htmltext = "30754-3.htm"
     if npcId == KANTABILON :
       if cond == 5 :
         htmltext = "31042-1.htm"
       if cond == 6 :
         htmltext = "31042-4.htm"
       if cond == 7 and st.getQuestItemsCount(MALRUK_SUCCUBUS_CLAW) == 10 :
         htmltext = "31042-3.htm"
       if cond == 8 :
         htmltext = "31042-6.htm"
     if npcId == STEDMIEL :
       if cond == 9 :
         htmltext = "30692-1.htm"
       if cond == 10 :
         htmltext = "30692-3.htm"
     if npcId == VIRGIL :
       if cond == 11 :
         htmltext = "31742-1.htm"
       if cond == 12 :
         htmltext = "31742-3.htm"
       if cond == 17 :
         htmltext = "31742-4.htm"
       if cond == 18 :
         htmltext = "31742-6.htm"
     if npcId == OGMAR :
       if cond == 12 :
         htmltext = "31744-1.htm"
       if cond == 13 :
         htmltext = "31744-3.htm"
     if npcId == RAHORAKTI :
       if cond == 13 :
         htmltext = "31336-1.htm"
       if cond == 14 :
         htmltext = "31336-4.htm"
       if cond == 15 and st.getQuestItemsCount(CRIMSON_MOSS) == 5 :
         htmltext = "31336-3.htm"
       if cond == 16 :
         htmltext = "31336-6.htm"
     if npcId == KASSANDRA :
       if cond == 16 and st.getQuestItemsCount(RAHORAKTIS_MEDICINE) == 1 :
         htmltext = "31743-1.htm"
       if cond == 17 :
         htmltext = "31743-3.htm"
     if npcId == CARADINE :
       if cond == 18 :
         htmltext = "31740-1.htm"
       if cond == 19 :
         htmltext = "31740-3.htm"
       if cond == 21 :
         htmltext = "31740-4.htm"
     if npcId == NOEL :
       if cond == 19 :
         htmltext = "31272-1.htm"
       if cond == 20 and st.getQuestItemsCount(LUNARGENT) < 5 and st.getQuestItemsCount(HELLFIRE_OIL) < 1 :
         htmltext = "31272-4.htm"
       if cond == 20 and st.getQuestItemsCount(LUNARGENT) >= 5 and st.getQuestItemsCount(HELLFIRE_OIL) >= 1 :
         htmltext = "31272-3.htm"
       if cond == 21 :
         htmltext = "31272-7.htm"
   else :
     htmltext = "31739-2.htm"
     st.exitQuest(1)
   return htmltext

def onKill (self,npc,player):
   npcId = npc.getNpcId()
   if npcId == BARAHAM:
     # get a random party member who is doing this quest and is at cond == 3  
     partyMember = self.getRandomPartyMember(player, "3")
     if partyMember :
         st = partyMember.getQuestState(qn)
         st.set("cond","4")
         st.giveItems(LEGEND_OF_SEVENTEEN,1)
         st.playSound("ItemSound.quest_itemget")
   if npcId in [20244,20245,20283,21508] :
     # get a random party member who is doing this quest and is at cond == 6  
     partyMember = self.getRandomPartyMember(player, "6")
     if partyMember :
         st = partyMember.getQuestState(qn)
         chance = st.getRandom(100)
         if CHANCE_FOR_QUEST_ITEMS > chance and st.getQuestItemsCount(MALRUK_SUCCUBUS_CLAW) < 10 :
           st.giveItems(MALRUK_SUCCUBUS_CLAW,1)
           st.playSound("ItemSound.quest_itemget")
           if st.getQuestItemsCount(MALRUK_SUCCUBUS_CLAW) == 10 :
             st.set("cond","7")
             st.playSound("ItemSound.quest_middle")
   if npcId in range(21508,215013) :
     # get a random party member who is doing this quest and is at cond == 14  
     partyMember = self.getRandomPartyMember(player, "14")
     if partyMember :
         st = partyMember.getQuestState(qn)
         chance = st.getRandom(100)
         if CHANCE_FOR_QUEST_ITEMS > chance and st.getQuestItemsCount(CRIMSON_MOSS) < 5 :
           st.giveItems(CRIMSON_MOSS,1)
           st.playSound("ItemSound.quest_itemget")
           if st.getQuestItemsCount(CRIMSON_MOSS) == 5 :
             st.set("cond","15")
             st.playSound("ItemSound.quest_middle")
   return

QUEST       = Quest(241,qn,"Possessor Of A Precious Soul - 1")
CREATED     = State('Start', QUEST)
STARTED     = State('Started', QUEST)
COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(TALIEN)
QUEST.addTalkId(TALIEN)

QUEST.addTalkId(STEDMIEL)
QUEST.addTalkId(GABRIELLE)
QUEST.addTalkId(GILMORE)
QUEST.addTalkId(KANTABILON)
QUEST.addTalkId(NOEL)
QUEST.addTalkId(RAHORAKTI)
QUEST.addTalkId(CARADINE)
QUEST.addTalkId(VIRGIL)
QUEST.addTalkId(KASSANDRA)
QUEST.addTalkId(OGMAR)

QUEST.addKillId(BARAHAM)
QUEST.addKillId(20244)
QUEST.addKillId(20245)
QUEST.addKillId(20283)
QUEST.addKillId(21508)

QUEST.addKillId(21508)
QUEST.addKillId(21509)
QUEST.addKillId(21510)
QUEST.addKillId(21511)
QUEST.addKillId(21512)

STARTED.addQuestDrop(BARAHAM,LEGEND_OF_SEVENTEEN,1)
STARTED.addQuestDrop(BARAHAM,MALRUK_SUCCUBUS_CLAW,1)
STARTED.addQuestDrop(BARAHAM,ECHO_CRYSTAL,1)
STARTED.addQuestDrop(BARAHAM,POETRY_BOOK,1)
STARTED.addQuestDrop(BARAHAM,CRIMSON_MOSS,1)
STARTED.addQuestDrop(BARAHAM,RAHORAKTIS_MEDICINE,1)
STARTED.addQuestDrop(BARAHAM,VIRGILS_LETTER,1)

print "importing quests: 241: Possessor Of A Precious Soul - 1"

 

31739-1.htm

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
Talien:<br>
Do you know the story of the seventeen heroes who challenged the Land
Dragon Antharas? It's fascinating! Such a heroic sacrifice! It could be
an epic poem! In fact, it's one of my all-time favorite stories! It's
what motivated me to become a bohemian poet! It's always been my dream
to write a great epic poem tying all the pieces of this story together.<br>
Well forget all that because we have made the quest simple !!<br>
I will make you Noblesse if you hav a second  Subclass at Level
50+.<br>
<a action="bypass -h Quest 241_PossessorOfAPreciousSoul_1 31739-4.htm">"Make
me Noblesse."</a>
</body>
</html>

 

31739-4

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
Talien:<br>
Awesome! Thank you! For comming to see me, we have saved you a lot of
time you are now Noblesse.! Only at Titan energy:}
</body>
</html>

 

  • 0
Posted

an einai la8os kt sunh8ws otan ginontai import ta quest k vrei la8os to server sto quest

s bgazei ena arxeio stn fakelo tou quest k s leei p einai akrivws to la8os p ekanes.....

Nai,to error...

Den exei bgalei ^^

Guest
This topic is now closed to further replies.


  • Posts

    • Project based on lucera2 Chronicle: Interlude Starting level: 80 Max level: 95 EXP/SP: x160 DROP:X1 RAID:X1 SAFE+7 MAX+25 Farm Aresa Cave of Trials Hellbound Night Instance - Elven Fortress from 10pm to 11pm PvP Areas Gludin Village - max item level 1 Garden of Eva - max items 3 lvl Hellbound Town - No restrictions *PvP Rewards enchant scrolls PVP SKILLS: - 1 lvl > 1000 pvps > Evo Magic Barrier - 2 lvl > 2000 pvps > Evo Shield - 3 lvl > 5000 pvps > Evo Might/Empower - 4 lvl > 10000 pvps > Evo Health - 5 lvl > 15000 pvps > Evo Bererker - 6 lvl > 20000 pvps > Evo Valor - Note: You need to restart to earn the skill! - Announcing your rank level on entering. - PvP Skills available only on the main class! - The buffs can be stucked from all levels! Custom Items Armors 5 lvls 1 lvl epic armor 2 lvl dynasty armor 3 lvl Vesper armor 4 lvl Titanium Armor 5 lvl Bloody Armor Weapons 6 lvls 1 lvl monster weapons 2 lvl dynasty weapons 3 lvl vesper weapons 4 lvl divine weapons (good for farm) 5 lvl weapons titanium weapons 6 lvl Raid & God weapons *Raid weapons can be earned only from RAIDS! * Raids and god weapons have the same stats. Jews Normal and Relic Accessories 1 & 2 lvl. Tattoos 1 & 2 lvl *2 lvl tattos can be enchanted. On each enchant adding atak speed, cast, hp, p.atk, m.atk, health depends on the tattoo. Enchant bonuses on weapon armors on weapon vary from +16 to +25 on armors +16 evo aura/ +18 bonus stas ENCHANT RATES BLESSED SCROLLS: -5% after every enchant EVO SCROLLS: +5% more chance than BLESSED EVO EPIC SCROLLS: +5% more chance and on fail the enchant stays the same DIVINE SCROLL: Only for divine weapons. 100% success rate. GOD SCROLL: 100% success rate. Only for God/raid weps/bloody armor. Farm and Economy Full custom farm mobs Armor/Weapon +++ as possible drop Custom Coins Custom chests (appear after the mob is killed with %). You can earn additional rare rewards. 2 levels of custom chests for better rewards. L2 Evo Quest - Daily challange. You need to collect 20 Evo Quest coins. After finishing the quest you will get your dialy reward. - 7 Days reward (progressive) - 4 cycles reward (When you finish 4 weeks quests, you will be awarded with a rare coin. You can exchange this Rare Coin for: 3 lvl weapon +0, Heroic Coin (3 days), 2 level jews. - Added quest tracking day 1: Silver Coins - 1000, 1 Blessed Scroll Weapon day 2: Blue Eva - 500, 2 Blessed Scroll Armor day 3: Silver Coins - 1400, 5 Event Medals day 4: Festival Adena- 50, 3 Blessed Scroll Weapon day 5: Silver Coins 2000, 4 Blessed Scroll Armor day 6: Blue Eva - 2000, Event Medal: 8 day 7: Heroic Contract 1, Event Medal 15 * With heroic contract you can get 3 days hero from the Donate Services NPC. All raids removed. All party mobs drop raid and epic raid coins. All clans have the chance to get unlimited raids. We have 3 custom pvp raids in the pvp zones. Respawn 12h. EVENTS TVT CTF SQUASH EVENT NIGHT EVENT Custom NPCS Gatekeeper Custom Shop - all important items Buffer - all needed buffs GM Shop - all basic items Donate shop - all items that can be donated Night Instance - Special Event (every day 10pm to 11pm) +2GMT *type .time in game to see the server time. Quest Manager Skill enchant manager Letters collector (earn additional rewards for collecting words) About classes: All classes boosted PVE skill dmg All summoners classes boosted (pet instant 92lvl) + boosted skills on pet. Critical Damage restriction formula. Website: https://l2evo.net GRAND OPENING: 24.04.2025 8PM +2 GMT. DISCORD: https://discord.gg/3DcBVKhNnX  
    • Get A Free Trial NOW! Get A Free Trial NOW! Get A Free Trial NOW!
    • Hi everyone, I bought this event pack. Everything looks great, it works well, and the seller responds with help and solutions to any issues. I definitely recommend buying it.
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
    • Looks great job, keep going and good luck with your sales!
  • Topics

×
×
  • Create New...