Beda su paciu scriptu ar java ?

    
  1. Atsijungęs

    Bogeyman

    Pranešimai: 0

    Persidarinejau nobless manageri failus ir pagrindinem persidarinejau kokio item reikia kad pasimti nobless tai pasidariau kad jei nori nobless reikia tureti 15 fa irasiau viskas normaliai pasileido be erroru bet paciam zaidime jei turi 15fa ten su 2sub viskas tvarkoj ir imi nobless raso kad arba neturi subo arba 15fa bet jeigu turi 16fa tada gali pasiimti nobless ir ir issminusuoja tik 15 fa ir 1 lieka imetu koda kaip perdarytas gal pats ka praleidau jus uzmatysite naudinga bet kokia pagalba :)
    import sys
    from com.l2jfrozen.gameserver.model.actor.instance import L2PcInstance
    from com.l2jfrozen.gameserver.model.actor.instance import L2NpcInstance
    from java.util import Iterator
    from com.l2jfrozen.util.database import L2DatabaseFactory
    from com.l2jfrozen.gameserver.model.quest import State
    from com.l2jfrozen.gameserver.model.quest import QuestState
    from com.l2jfrozen.gameserver.model.quest.jython import QuestJython as JQuest

    qn = "6666_NoblessTrader"

    NPC = [31434]
    NOBLESS_TIARA = 7694
    FESTIVAL_ADENA = 6673
    QuestId = 6666
    QuestName = "NoblessTrade"
    QuestDesc = "custom"
    InitialHtml = "31739-1.htm"

    print "Nobless Trader (31434) Enabled..."

    class Quest (JQuest) :

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

    def onEvent(self,event,st):
    htmltext = "I have nothing to say you"
    cond = st.getInt("cond")
    count=st.getQuestItemsCount(FESTIVAL_ADENA)
    if event == "31739-3.htm" :
    if cond == 0 and st.getPlayer().isSubClassActive() :
    if st.getPlayer().getLevel() >= 80 and count > 15:
    htmltext=event
    st.set("cond","0")
    st.getPlayer().setNoble(True)
    st.giveItems(NOBLESS_TIARA,1)
    st.playSound("ItemSound.quest_finish")
    st.setState(COMPLETED)
    st.takeItems(FESTIVAL_ADENA,15)
    else :
    htmltext="31739-2.htm"
    st.exitQuest(1)
    else :
    htmltext="31739-2.htm"
    st.exitQuest(1)
    return htmltext

    def onTalk (self,npc,player):
    htmltext = "I have nothing to say you"
    st = player.getQuestState(qn)
    if not st : return htmltext
    npcId = npc.getNpcId()
    id = st.getState()
    if id == CREATED :
    st.set("cond","0")
    htmltext="31739-1.htm"
    elif id == COMPLETED :
    htmltext = "This quest have already been completed."
    else :
    st.exitQuest(1)
    return htmltext


    QUEST = Quest(6666,qn,"custom")
    CREATED = State('Start', QUEST)
    STARTING = State('Starting', QUEST)
    STARTED = State('Started', QUEST)
    COMPLETED = State('Completed', QUEST)
    QUEST.setInitialState(CREATED)

    for npcId in NPC:
    QUEST.addStartNpc(npcId)
    QUEST.addTalkId(npcId)
    17 Birželio 2015 - 17:31 / #1
  2. 
  3. Atsijungęs

    EsTriFee

    Pranešimai: 0

    sita:
    if st.getPlayer().getLevel() >= 80 and count > 15:
    pakeist i:
    if st.getPlayer().getLevel() >= 80 and count >= 15:
    Paskutinį kartą redagavo: EsTriFee 17 Birželio 2015 - 18:13
    17 Birželio 2015 - 18:13 / #2
  4. 
  5. Atsijungęs

    Bogeyman

    Pranešimai: 0

    Aciu susitvarke :)
    Kad nekurt kitos temos iskarto cia paklausiu dar karta turiu NPC NameChanger ten viskas veikia bet vat per scripta padaryta kad clano leaderis arba clano memberis negeli keisti nick persidariau biski ta koda kad leistu ir kai pasikeiciu nick po rr dingsta clanas su mebemriu nebendziau bet isivaizduojiu kad jeigu padarysiu rr nebebusiu clano memberis tai cia man reiktu perasyt koda visa ar kaip ? :)
    17 Birželio 2015 - 19:31 / #3
  6. 
  7. Atsijungęs

    povis111

    Pranešimai: 0

    Palei mane turetu taip but tik su klanu lyderiais, tad jei keiti lyderio varda, pakeisk ir klanu tabletej duombazej jo varda
    17 Birželio 2015 - 19:51 / #4
  8. 
  9. Atsijungęs

    Bogeyman

    Pranešimai: 0

    Nu tai cia jau turetu but kitas kodas kaip suprantu nes kiekvienu kartu pakeites nicka man i pm nerasys kad klano leaderio nicka per duombaze keisciau :D reike internete paieskot gal rasiu kaska panasaus :D
    17 Birželio 2015 - 20:26 / #5
  10. 
  11. Atsijungęs

    EsTriFee

    Pranešimai: 0

    Dingsta paprastam memberiui clanas...? ar dingsta clanas visas kai leaderis pasikeicia ar kaip?
    17 Birželio 2015 - 21:54 / #6
  12. 
  13. Atsijungęs

    Bogeyman

    Pranešimai: 0

    Nu pilnai neistikrinau bet kai leaderis pasikeicia nicka jam klanas dingsta bet tik po rr o kai atkeiti atgal jo nebeatgauna Nu koda toks:
    NPC = 31434

    # X-Line Extremo
    # ID Do Coin: 6673 (Festival Adena)
    ITEM_ID = 6673


    # Contagem do Item
    NAME_COUNT = 25

    # ============================================================================

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

    def onEvent(self,event,st) :
    if event == "1":
    return "1.htm"

    if not CharNameTable.getInstance().doesCharNameExist(event):
    if len(event) >= 3 and len(event) = NAME_COUNT:
    st.takeItems(ITEM_ID,NAME_COUNT)
    L2World.getInstance().removeFromAllPlayers(st.getPlayer());
    st.getPlayer().setName(event);
    st.getPlayer().store();
    L2World.getInstance().addToAllPlayers(st.getPlayer());
    st.getPlayer().broadcastUserInfo();
    return "complete.htm"
    else:
    return u"You Don't Have 25FA"
    else:
    return u"Try again!"
    else:
    return u"This name already exists on this SERVER"
    return u"You Don't Have 25FA"

    def onTalk (self,npc,player):
    return "index.htm"

    QUEST = Quest(1003, "1003_Name", "custom")

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


    Sita Eilute Nutrini:
    if st.getPlayer().isClanLeader():
    return u"Clan Leader Can't Change Name!"
    if st.getPlayer().getClan():
    return u"You are a clan member you can't Change Your Name!"
    Pasileidzia be erroru ir pns bet sakau clano leaderis pakeicia dingsta clanas jam o del memberio nzn neisbandziau dar :/
    Paskutinį kartą redagavo: Bogeyman 17 Birželio 2015 - 22:03
    17 Birželio 2015 - 22:02 / #7
  14. 
  15. Atsijungęs

    wewewe

    Pavadinimas: L2 žaidėjas

    Narys

    Pranešimai: 727

    Vartotojo apdovanojimai: 16

    dekit kodus sava i pastebin arba bent cia i code tag'a, nes nu bliamba akis issilauzt gali taip beskaitydamas
    18 Birželio 2015 - 00:04 / #8
  16. 
  17. Atsijungęs

    Bogeyman

    Pranešimai: 0

    wewewe,
    Okay
    18 Birželio 2015 - 00:15 / #9