Filehost.ro - gazduire fisiere
Hartie
Tutoriale,hackuri,filme,jocuri si multe altele !
Nou pe simpatie:
Diana2019 din Vaslui
Femeie
25 ani
Vaslui
cauta Barbat
25 - 80 ani
HartieInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Hartie / Download Center / Npc Nobless Maker Pagini: 1 Moderat de anarhy991
#1
Hartie
Administrator
Postari: 939
Acest npc va face noblesse direct daca ai 5 lunargents si 1 helfire oil(acestea pot fi schimbate).Ca sa fiti noblesse trebuie sa fiti pe subclasa si lvl mai mare de 75
adaugati intrun __init__.py urmatorul cod:


# Made by Puka admin of L2Moria: www.l2moria.go.ro
import sys
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 = "64000_noblessenpc"

# NPC
NPC = 31739 #aici puneti id-ul la npc-ul de unde sa luati noblesse(default=Talien 31739)

# QUEST ITEM
ITEM = 6029 #aici puneti id la ce item sa trebuiasca pt a fi noblesse(default=lunarget)
ITEM_QTY = 5 #aici scrieti cate ITEM sa trebuiasca (ex:5 lunarget)
ITEM2 = 6033 #aici puneti idul la celalalt item
ITEM2_QTY = 1 #aici scrieti cate ITEM2 sa trebuiasca (ex:1 helfire oil)
NOBLESS_TIARA = 7694

# HTML OUTPUT
HTMLSTART = "<html><body>Talien:<br>Hello!What you want from me?I can give you only noblesse status but only for 5 lunargents and 1 helfire oil!You want?<br><a action="bypass -h Quest 64000_noblessenpc 1\">Yes,I want!</a></body></html>"
HTMLNOTLEVEL = "<html><body>Talien:<br>Come back on when you have at least lvl 75 and you are on subclass!</body></html>"
HTMLNOTENOUGH = "<html><body>Talien:<br>Come back at me when you have 5 lunargents and 1 helfire oil!</body></html>"
HTMLOK = "<html><body>Talien:<br>Congratulations, now you have noblesse status!<br>You can in go in heine to participate at olympiad too!</body></html>"
HTMLALRNOBLE = "<html><body>Talien:You are already noblesse,you can make this quest only one time!</body></html>"

class Quest (JQuest) :

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

  def onAdvEvent (self,event,npc,player):
    st = player.getQuestState(qn)
    if not st :
      st = self.newQuestState(player)
    if event == "1" :
      if st.getQuestItemsCount(ITEM) < ITEM_QTY or st.getQuestItemsCount(ITEM2) < ITEM2_QTY :
        htmltext = HTMLNOTENOUGH
      else :
        htmltext = HTMLOK
        st.getPlayer().setNoble(True)
        st.takeItems(ITEM,ITEM_QTY)
        st.takeItems(ITEM2,ITEM2_QTY)
        st.getItems(NOBLESS_TIARA,1)
        st.playSound("ItemSound.quest_finish"
        st.setState(COMPLETED)
      return htmltext
   
  def onTalk (self,npc,player) :
    htmltext = HTMLALRNOBLE
    st = player.getQuestState(qn)
    if not st : return htmltext
    if npc.getNpcId() == NPC :
      if player.getLevel() < 75 or not st.getPlayer().isSubClassActive() :
        htmltext = HTMLNOTLEVEL
      else :
        if id == COMPLETED :
          htmltext= HTMLALRNOLBE
        else :
          htmltext = HTMLSTART
      return htmltext
           
QUEST = Quest(64000,qn,"noblessenpc"
CREATED     = State('Start', QUEST)
COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)

QUEST.addStartNpc(NPC)
QUEST.addTalkId(NPC)


dupa ce ati adaugat asta in jscript/quest/64000_noblessenpc si ati introdus in ___init___.py din jscript/quest trebuie sa creati un fisier html in data/html/default cu numele la la fel ca idul npcului.In el trebuie sa scrieti urmatorul cod:


<html>
<title>Aici Pune Un Titlu</title>
<head>
<font>%npcname%</font><br>
<br>
Aici pune o descriptie ceva...<br>
<br>
<a action="bypass -h npc_%objectId%_Quest 64000_noblessenpc">I want to be noblesse!</a>
<br>
Quest Made By Puka Admin of L2Moria www.l2moria.go.ro
<br>
</head>
</html>



Credit:Facut de japana

Attention:Npc-ul pe care il faceti in baza de date trebuie sa fie de tipul: L2Npc .

Daca vreti adaugat mai multe iteme sau sa mai faceti ceva la el sami spuneti!


 
   
Pagini: 1  
Mergi la