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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • L2 PVPTOP - HTML DESIGN    
    • Do not trust this guy, he will scam you. I have sent proof to the mods, I have posted proof on another thread and I can send proof to anyone who DMs me. Avoid this guy. So not only did he scam me out of $51 USDTthen delete his messages and blocked me (I have proof) . You can see his Facebook group is constantly changing names depending on his most current scam. If you see this message and you still decide to go forward with sending your money to him, that’s on you. I can’t stress this enough. This guy is a scammer. 
    • So Goldbar thinks that deleted his side of the conversation makes it easier to claim he didn’t scam me. But I sent him $51 USDT to his ERC-20 account it was verified, he acted like it was fine but then deleted his messages and blocked me. Seriously do not trust this guy. 
    • Hi everyone, let me introduce myself—I'm Martin, a junior developer. I'm diving into the world of L2 servers, and honestly, I'm super overwhelmed about where to start learning the right way to set up, configure, and run a server. There are so many datapacks—free, private—but it's so much that my head feels like it's going to explode. I'm currently looking for someone or an active project willing to take me on as an intern. I'm not looking to make money—I'm just here to learn and grow out of pure passion for L2. I've already been working with L2jMobius H5. I managed to edit the Community Board, add a buffer, GM Shop, and teleports. I've also created custom NPCs for the GM Shop, and imported new custom weapons and armors—complete with original glow effects, like the Valakas and Antharas weapons. But there's still a lot I don't know, and it can get overwhelming. That’s why I’m looking for someone—or an active non-profit project—willing to take me on as an intern. I’m not looking to make money; I just want to learn, contribute, and grow out of pure passion for L2. If you’re working on a project and could use a motivated learner who’s eager to help, I’d love to connect!
    • Our next easy-botting project, Kain, is right around the corner! Launching tomorrow, Saturday, April 26th at 9:00 ET (UTC -4)! If you haven’t, check out the features and join our Discord to catch up on the latest drama. See you very soon! Read more about L2Toggle and Kain on our site and forum!  
  • Topics

×
×
  • Create New...