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

    • 🌟 Arena Fights – PvP System for Lineage II servers 📋 Overview The Arena Fights Manager is a fully automated and battle-proven PvP tournament system built for Lineage 2 servers (based on aCis pack standards). It offers hourly or custom-scheduled 1v1 fights, spectator options, disconnection handling, automatic NPC managers, and dynamic rescheduling, ensuring continuous and engaging PvP without the need for GM intervention. Ideal for any serious server that wants to offer competitive, organized, rewarding PvP content.   ⚙️ Features ✅ Full Automation Automatic start/stop based on your custom schedule (Config.ARENA_FIGHTS_SCHEDULE). Reschedules every day at 23:59 for the next day's tournaments. Server restarts during an event? No problem — the system self-detects and continues! ✅ Matchmaking System Smart queue system for 1v1 match creation. Automatic pairing: when two players are queued, a match is instantly created. Validation checks to remove disconnected or invalid players from the queue. ✅ Dynamic PvP Arenas Predefined player teleport locations for fair 1v1 battles. Spectator mode available: players can view live battles through the event interface. ✅ NPC Manager Control Spawns special Arena Manager NPCs during event times. NPCs are deleted when the event finishes to keep the world clean. Multiple Managers can be placed easily. ✅ Robust Player Handling Handles disconnects gracefully: Saves disconnected players. Restores them to a safe location on reconnection. Removes them from the queue or match without crashes or bugs. Players receive a system message upon restoration. ✅ Clean Coding Practices Fully integrated with ThreadPool tasks for efficient, non-blocking performance. Uses CopyOnWriteArrayList for thread-safe collections (queues, matches, disconnected players). Singleton Pattern ensures only one Arena Manager instance exists. ✅ Visual Enhancements World Announcements during important event phases ("Arena Fights have started!", "Battles are over!"). Red Sky Effect (ExRedSky) during Arena start and end for immersive atmosphere. ✅ Admin-Friendly Commands Allows NPC broadcast announcements. Easy to check current running matches and spectate them. Display list of ongoing matches dynamically.   📦 Technical Highlights Built with a modular and clean structure. Zero dependency on hardcoded values — everything configurable via the server Config. Handles dynamic spawning and safe deletion of NPCs through SpawnTable. Utilizes InstanceManager to safely handle player instances.   🎯 Why Choose This Arena System? Feature Other           Arena Fights Disconnection handling ❌ ✅ Fully automatic scheduling ❌ ✅ Daily rescheduling ❌ ✅ Manager NPC auto-spawn/despawn ❌ ✅ Queue matchmaking without GMs ❌ ✅ Clean code with thread-safety ❌ ✅ Integrated visual effects (Red Sky) ❌ ✅ Instant spectating capabilities ❌ ✅ 📈 Expandability Can be adapted to reward players with custom currencies (e.g., Arena Trophy). Could integrate ranking systems based on wins/loses. Room to add betting systems for spectators!   🔥 Screenshots / Preview (Optional) Lobby NPC screenshots Battle happening Spectator UI Disconnection restoration notification   💬 Final Words The Arena Fights Manager is not just a PvP mini-event — it's a major daily PvP engine that will boost: Player activity Server competitiveness Community engagement   It’s optimized for performance, designed for smoothness, and built for growth.   🛒 Available for purchase! Interested? Contact me and let's make your server shine.   PM me directly for inquiries and purchases. Discord: @Luminous   Pricing: Full License: 70e (One-time payment) Support & Updates: included on full licence
    • As if he's dead? Jesus christ  
    • I've heard a rumor that he's no more with us, I hope it's not true
  • Topics

×
×
  • Create New...