Jump to content

Recommended Posts

Posted

import sys

from com.l2jfree                                  import Config

from com.l2jfree                                  import L2DatabaseFactory

from com.l2jfree.gameserver.datatables            import CharTemplateTable

from com.l2jfree.gameserver.communitybbs.Manager  import RegionBBSManager

from com.l2jfree.gameserver.model                import L2World

from com.l2jfree.gameserver.model.quest          import State

from com.l2jfree.gameserver.model.quest          import QuestState

from com.l2jfree.gameserver.model.quest.jython    import QuestJython as JQuest

from com.l2jfree.gameserver.network.serverpackets import EtcStatusUpdate

from com.l2jfree.gameserver.network.serverpackets import PledgeShowInfoUpdate

from com.l2jfree.tools.random                    import Rnd

 

qn = "8700_Services"

 

NPC = 8700

 

 

# Items

Item = 3481

GenreCount = 10

 

print "INFO Loaded: 8700_Services"

 

 

def AutoChat(npc, text) :

  chars = npc.getKnownList().getKnownPlayers().values().toArray()

  if chars != None :

    for pc in chars :

      sm = NpcSay(npc.getObjectId(), 0, npc.getNpcId(), text)

      pc.sendPacket(sm)

 

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)

    htmltext = event

 

    if event == "changeGenre" :

      if st.getQuestItemsCount(Item) < GenreCount :

        htmltext = "cant.htm"

      elif player.isCursedWeaponEquipped() :

        AutoChat(npc, player.getName()+" you can't change your genre when you are equipped with a Cursed Weapon.")

        htmltext = "cant.htm"

      else :

        if player.getAppearance().getSex() == 1 :

          newGenre = 0

        else :

          newGenre = 1

        con = L2DatabaseFactory.getInstance().getConnection(None)

        offline = con.prepareStatement("UPDATE characters SET sex = ? WHERE charId = ?")

        offline.setInt(1, newGenre)

        offline.setInt(2, player.getObjectId())

        try :

          offline.executeUpdate()

          offline.close()

          con.close()

        except :

          try : con.close()

          except : pass

        player.store()

        player.broadcastUserInfo()

        player.decayMe()

        player.spawnMe(player.getX(), player.getY(), player.getZ())

  st.takeItems(Item, GenreCount)

        return "2.htm"

        st.playSound("ItemSound.quest_finish")

        st.exitQuest(1)

   

 

   

 

  def onTalk(self, npc, player) :

    htmltext = ""

    st = player.getQuestState(qn)

    if not st :

      st = self.newQuestState(player)

    htmltext = "1.htm"

    st.playSound("ItemSound.quest_accept")

    return htmltext

 

QUEST = Quest(8700,qn,"custom")

 

QUEST.addStartNpc(NPC)

 

QUEST.addTalkId(NPC)

 

exo ct 1,5 mipos prepi na kano kapia alagi giati den doyleboyn mexri edo mia xara  [ Hello, im Sure i wana Change ] molis patiso afto moy lei [ you are either not on a quest thet involver this npc, or you don't meet this npc's minimum quest requirements mipos mporis na boi8isis pliz

  • 1 month later...
Posted

loipon to dokimasa kai douleuei kai se gracia part 2 alla thelei liges metatropes.gia paradeigma prepei na prostheseis mia entoli ekei pou pernei buffs apo newbie guide...ola ta alla doulepsan poli kala Poli kalo share file

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

    • Hello everyone,   A quick update from the Emerge team. The official launch of Emerge Eclipse x10 is just around the corner and we are currently finishing the final preparations to ensure a smooth and stable opening for all players. Our team has been working on performance improvements, network optimizations, and additional infrastructure to provide the best possible experience from day one.   🚀 Launch Date: 7 June 2026 🕕 Launch Time: 18:00 CET We would like to invite everyone to join our Discord community where all announcements, updates, events, and support information are posted first. 🌐 Website: https://l2emerge.com 💬 Discord: https://discord.gg/l2emerge Thank you for all the support and feedback during the preparation phase. We look forward to seeing both new and veteran Lineage II players on launch day. See you soon on Emerge!
    • Added an enchant NPC ( more infos on test server)     - remade autofarm system, more clever , more humanlike steps, catacomb mode in route farm and rewrite of route farming   - Updated Antibot to defend even more from more advanced adrenaline users ( not gonna write how 😂 )   - now dll of antibot will not be flagged from antivirus or defenders   - Updated some more the AI based Agent     Our discord https://discord.gg/acvqx9rbhy   L2R Off files / monthly subscription
    • Interlude will never be the same again. To celebrate our first 3 months online, L2 Detona proudly presents League of Lineage.   A brand-new game mode inspired by the world's biggest MOBAs, bringing lane battles, minions, towers, strategic objectives, and epic team fights into the world of Lineage 2. All of this while preserving the essence that made Interlude one of the most beloved chronicles in Lineage 2 history.   ⚔️ Destroy enemy towers. 🛡️ Defend your base. 👑 Lead your team to victory.   📅 Officially launching on June 12, 2026. 🔥 Jump into the action right now through System_Test and become one of the first players to experience League of Lineage. Server Rates XP: 500x SP: 500x Adena: 200x Server Features Full Official Interlude gameplay with custom modifications Exclusive MOBA Arena 3 Hour Buffs for comfortable gameplay No Class Change Quests Website: https://www.l2detona.com Images of project: https://imgur.com/a/Lajn9Ag
    • Remove google ads from site , will be perfect without this.. we do a vote and we get 2-3 google ads, its nervus. i just give feedback you do ofc what you want 🙂
  • 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..