Jump to content

Recommended Posts

Posted

Название квеста: Seductive Whispers

Выполнять обязательно группой

Можно повторно взять квест

Расы: Все

Классы: Все

Требуемый левел: 50

Где брать квест: Town of Aden

У кого брать квест: Blacksmith Wilbert

Награда: Adena, или armor/weapon scrolls, или 60% B weapon receipes

 

Описание:

Кузнец Вилберт желает играть с вами в новую модную игру, но говорит, что для игры вам понадобятся бусинки. Вам нужно раздобыть их, чтобы начать играть.

1. Поговорите с Blacksmith Wilbert в кузнице Адена и возьмите задание.

2. Выбивайте итемы в Cemetry, Ancient Battleground, Fields of Massacre. Для одной игры нужно собрать 50 Spirit Beads.

3. Накопив минимум 50 бусин, вернитсь к Blacksmith Wilbert, чтобы играть.

Правила игры:

Когда вы скажете гному, что хотите играть с ним, просто кликайте по ссылке, чтобы тянуть карту, до тех пор, пока он не скажет вам, выиграли вы или проиграли. Если вы проиграли, то не получите ничего. Если выиграете, то можете или взять награду, или продолжить тянуть карты. Если вы отказывайтесь от предложенной награды и продолжите играть, то награда увеличивается. Вы можете попытать счастья получить более ценный приз, но, если в этом случае проиграете, то не получите ни его, ни то, что гном предлагал ранее.

Награда:

1 выигрышный раунд - 40,000а

2 выигрышных раунда - 80,000а

3 выигрышных раунда - 110,000а, EWD

4 выигрышных раунда - 199,000а, EWC

5 выигрышных раундов - 388,000а, 60% рецепт на B-grade weapon

6 выигрышных раундов - 675,000а, 1 кусок на B-grade weapon

7 выигрышных раундов - 1,284,000а, 2 EWB, 2 EAB

8 выигрышных раундов - 2,384,000а, 1 EWA, 2 EAA

 

Сам скрипт

 

 

# by minlexx

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 = "663_SeductiveWhispers"

 

# Npc

WILBERT = 30846

 

MOBS = [20674, 20678, 20954, 20955, 20956, 20957, 20958, 20959, 20960, 20961, 20962, 20974, 20975, 20976, 20996, 20997, 20998, 20999, 21001, 21002, 21006, 21007, 21008, 21009, 21010]

 

# Quest Item

SPIRIT_BEAD = 8766

 

# Drop chance, win chance need check for correct values

DROP_CHANCE = 80

WIN_ROUND_CHANCE = 66

 

# Reward items

ADENA = 57

EWA = 729 # Scroll: Enchant Weapon A

EAA = 730 # Scroll: Enchant Armor A

EWB = 947 # Scroll: Enchant Weapon B

EAB = 948 # Scroll: Enchant Armor B

EWC = 951 # Scroll: Enchant Weapon C

EWD = 955 # Scroll: Enchant Weapon D

 

# ====== Rewards -  B grade 60% weapon recipes & keymats =========

# These are just most popular B weapons, need retail check here

# Blunts: Art of Battle Axe, Staff of Evil Spirits (2)

# Bows: Bow of Peril (1)

# Daggers: Demon Dagger, Kris (2)

# Fists: Bellion Cestus (1)

# Polearms: Lance (1)

# Swords: Great Sword, Keshanberk, Sword of Valhalla (3)

# ====== Total: 10; In that order they come in a set below: ======

B_RECIPES = [4963, 4966, 4967, 4968, 5001, 5003, 5004, 5005, 5006, 5007]

B_KEYMATS = [4101, 4107, 4108, 4109, 4115, 4117, 4118, 4119, 4120, 4121]

 

class Quest (JQuest) :

 

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

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

  self.questItemIds = []

 

def onEvent (self,event,st) :

  htmltext = event

  if event == "Wilbert_IWantToPlay.htm": # quest accepted

    st.setState(State.STARTED)

    st.playSound("ItemSound.quest_accept")

    st.set("cond","1")

    st.set("round","0")

  elif event == "Wilbert_ExitQuest.htm": # quest finished

    st.playSound("ItemSound.quest_finish")

    st.exitQuest(1)

  elif event == "Wilbert_IWantToPractice.htm": # practice start dialog

    beads=st.getQuestItemsCount(SPIRIT_BEAD)

    if beads<1:

      htmltext = "Wilbert_Practice_NotEnoughBeads.htm"

  elif event == "Wilbert_Practice.htm": # "try luck" pressed (Practice)

    beads=st.getQuestItemsCount(SPIRIT_BEAD) # get beads count, it must be > 1

    if beads<1:

      htmltext = "Wilbert_Practice_NotEnoughBeads.htm"

    else:

      st.takeItems(SPIRIT_BEAD,1) # take one bead as payment for luck test

      random=st.getRandom(100)

      if random<WIN_ROUND_CHANCE: # random value is in range [0..WIN_ROUND_CHANCE]

        htmltext = "Wilbert_PracticeWon.htm"

      else: # lose practice :(

        htmltext = "Wilbert_PracticeLost.htm"

  elif event == "Wilbert_LetsPlay.htm": # "Let's play" pressed

    beads=st.getQuestItemsCount(SPIRIT_BEAD)

    if beads<50:

      htmltext = "Wilbert_Practice_NotEnoughBeads.htm"

    else:

      htmltext = "Wilbert_PlayRound1.htm"

      st.set("round","0")

  elif event == "Wilbert_PullCard.htm": # "Pull first or next card" pressed

    round=st.getInt("round")

    beads=st.getQuestItemsCount(SPIRIT_BEAD)

    if beads<50 and round == 0: # check for 50 beads when game just starts only (round=0)

      htmltext = "Wilbert_Practice_NotEnoughBeads.htm"

    else:

      if round == 0: # take 50 beads when game just starts only (round=0)

        st.takeItems(SPIRIT_BEAD,50)

      random=st.getRandom(100)

      if random>WIN_ROUND_CHANCE: # random value is in range [WIN_ROUND_CHANCE..100]

        htmltext = "Wilbert_PlayLose.htm"

        st.set("round","0") # restart game

      else: # next round won

        round = round + 1

        htmltext = st.showHtmlFile("Wilbert_PlayWin.htm").replace("NROUND", str(round))

        if round == 1:

          htmltext = htmltext.replace("MYPRIZE","40,000 adena")

        if round == 2:

          htmltext = htmltext.replace("MYPRIZE","80,000 adena")

        if round == 3:

          htmltext = htmltext.replace("MYPRIZE","110,000 adena, D-grade Enchant Weapon Scroll")

        if round == 4:

          htmltext = htmltext.replace("MYPRIZE","199,000 adena, C-grade Enchant Weapon Scroll")

        if round == 5:

          htmltext = htmltext.replace("MYPRIZE","388,000 adena, 1 recipe for a B-grade weapon")

        if round == 6:

          htmltext = htmltext.replace("MYPRIZE","675,000 adena, 1 essential ingredient for a B-grade weapon")

        if round == 7:

          htmltext = htmltext.replace("MYPRIZE","1,284,000 adena, 2 B-grade Enchant Weapon Scrolls, 2 B-grade Enchat Armor Scrolls")

        if round == 8: # reached round 8; give prizes and restart game

          round = 0

          st.giveItems(ADENA,2384000)

          st.giveItems(EWA,1) # Scroll: Enchant Weapon A

          st.giveItems(EAA,2) # Scroll: Enchant Armor A

          htmltext = "Wilbert_PlayWonRound8.htm"

        st.set("round",str(round))

  elif event == "Wilbert_TakePrize.htm": # player won round and wants to stop game and take prize

    round=st.getInt("round")

    if round == 0: # player did not win any round but wants to take prize? O_o

      htmltext = "<html><body>You did not win any round! No prizes.</body></html>"

      return htmltext

    if round > 8: # some bug or hack?

      st.set("round","0")

      htmltext = "<html><body>Round cannot be > 8 !!!</body></html>"

      return htmltext

    st.set("round","0") # first set round to 0 - game ended.

    htmltext = "Wilbert_PrizeTaken.htm"

    # give prize depending on current round won

    if round == 1:

      st.giveItems(ADENA,40000)

    elif round == 2:

      st.giveItems(ADENA,80000)

    elif round == 3:

      st.giveItems(ADENA,110000)

      st.giveItems(EWD,1) # Scroll: Enchant Weapon D

    elif round == 4:

      st.giveItems(ADENA,199000)

      st.giveItems(EWC,1) # Scroll: Enchant Weapon C

    elif round == 5:

      st.giveItems(ADENA,388000)

      # 60% B-weap. rec number is random

      st.giveItems(B_RECIPES[st.getRandom(len(B_RECIPES))], 1)

    elif round == 6:

      st.giveItems(ADENA,675000)

      # B-weap. key number is random

      st.giveItems(B_KEYMATS[st.getRandom(len(B_KEYMATS))], 1)

    elif round == 7:

      st.giveItems(ADENA,1284000)

      st.giveItems(EWB,2) # Scroll: Enchant Weapon B

      st.giveItems(EAB,2) # Scroll: Enchant Armor B

    # for round 8 prize is automatically when player wins 8 round

  return htmltext

 

def onTalk (self,npc,player):

  st = player.getQuestState(qn)

  htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"

  if not st : return htmltext

  npcId = npc.getNpcId()

  id = st.getState()

  # first talk to Wilbert

  if npcId == WILBERT and id == State.CREATED:

      if player.getLevel() >= 50 : # check player level

          htmltext = "Wilbert_start.htm"

      else:

          htmltext = "<html><body>This quest is for characters above level 50 only.</body></html>"

          st.exitQuest(1)

  # talk to Wilbert when quest already in progress

  elif npcId == WILBERT and id == State.STARTED :

      htmltext = "Wilbert_QuestInProgress.htm"

  return htmltext

 

def onKill(self,npc,player,isPet):

  st = player.getQuestState(qn)

  if not st : return

  if st.getState() != State.STARTED : return

  npcId = npc.getNpcId()

  if npcId in MOBS:

    if st.getRandom(100) < DROP_CHANCE:

      st.giveItems(SPIRIT_BEAD,1)

      st.playSound("ItemSound.quest_itemget")

  return

 

QUEST = Quest(663,qn,"Seductive Whispers")

 

QUEST.addStartNpc(WILBERT)

QUEST.addTalkId(WILBERT)

 

for mobId in MOBS:

  QUEST.addKillId(mobId)

  • 3 months later...

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

    • I can see that the admins arent taking any action, yet they still seem willing to share information about various other people names and IP addresses. But when it comes to scams, no one reacts.      
    • Server Info Chronicle:  Interlude                                                                                                                                    XP: 100x | SP: 100x | Drop: 50x | Adena: 75x Enchant: Safe +3 |  Max +21 Website: Website Link Discord: Discord Link   WHY? When I was a teenager I had this idea. Build my own Lineage 2 server. My own rules. My own world. I wasn't a programmer. I had no idea how any of it worked. I tried, hit a wall, and quit. But the idea never left. I came back years later. Got further. Quit again. Watched friends try similar things. The idea stayed stuck in my head for fifteen years. I'm a developer now. I finally finished it. Not because I suddenly had more time - I have a full-time job and real responsibilities. An hour before bed if I'm lucky. That's actually exactly why I finished it.   The problem I kept running into I still love this game. But every server I tried as an adult made that one hour feel worthless. Log in, kill a few mobs, make no real progress, log out frustrated. The game was designed for someone with unlimited time. That person doesn't exist in my life anymore. I looked around. Everyone I used to play with has the same problem. Same love for the game. Same lack of time. Jobs, families, maybe an hour late at night. So I stopped waiting for someone else to build it.           WHAT? Custom starting zone in Gludin (up until 2nd profession start) Talent system - rebirth at level 80 and choose your talents Bounty hunter system - daily tasks to kill random monsters to receive great reward! Potion crafting system - custom HP/MP potions and recipes Custom 1st & 2nd class quests (shorter) Scheme buffer Shop until C grade   Visit our website to get more info: Website Link   The philosophy 95% of the game is completely soloable. No clan required. No raid schedules. No guilt when you have to log off. You are the solo director of your own session. Log in, pursue your goal for an hour, log out on your own terms. When you've conquered what you wanted - you stop naturally. A new season drops with fresh Talent Tree changes and you come back to build something completely different. No endless stretched grind. No pay-to-win. No shady admin decisions. No surprise wipes. I'm one developer who built this because I love it.                                          This is the server I needed fifteen years ago. Glad I finally had the skills to build it. Come see what I made. [Forever Lineage]
    • Hello MaxCheaters community! We’ve all been there: you spend months customizing your NPCs, balancing classes, and setting up the perfect farm zones. You launch your server, the hype is real, and suddenly you hit 200 players—and the "delay" starts. The mobs stop reacting, the Olympiad matches stutter, and your players start complaining on Discord. Many "newbie" admins think the solution is just throwing more RAM at the VPS. While hardware matters, Java is a finicky beast. If you don't tune your JVM (Java Virtual Machine) and your core code, you’ll lag even on a NASA supercomputer. Today, I’m sharing a deep dive into optimizing your L2 server for maximum performance. 1. The Myth of "More RAM" The biggest mistake people make is assigning 32GB of RAM to a server that only needs 8GB. In Java, if your Heap size is too large, the "Garbage Collector" (GC) has to work much harder. When the GC runs a "Full GC" cycle on a massive heap, it performs a "Stop-the-World" event. This literally freezes your server threads for 1–3 seconds to clear memory. Recommendation: For a mid-rate server with 500 players, 6GB to 8GB of Xmx (Max Heap) is usually the sweet spot. Use G1GC (Garbage First Garbage Collector) instead of the old ParallelGC. It handles large heaps much more gracefully by breaking memory into regions. 2. JVM Startup Flags (The Secret Sauce) Don't just run java -jar l2jserver.jar. You need specific flags to ensure the CPU prioritizes the right tasks. Try adding these to your start.sh or start.bat: Bash   -Xms6G -Xmx6G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:+OptimizeStringConcat -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:+TieredCompilation MaxGCPauseMillis=50: This tells Java, "Try not to freeze the server for more than 50ms at a time." It makes the gameplay feel much smoother for the end-user. 3. Geodata and Pathfinding Optimization Geodata is the biggest CPU killer in Lineage 2. Every time a mob moves or a player clicks, the server calculates "Can I see this target?" and "Is there a wall in the way?". The Fix: Use a "Pathfinding Cache." If 100 players are running from the Giran Gate to the Luxury Shop, the server shouldn't calculate that path 100 times. Check your Geodata format: Ensure you are using the .l2j or .dat formats optimized for your specific core. If your console is flooded with "Pathfind node limit reached," increase your node limit in the geo.properties file, but be prepared for higher RAM usage. 4. Database Pooling (HikariCP vs. C3P0) If your server freezes for a split second every time someone saves their character or buys an item, your Database Connection Pool is the bottleneck. Most old L2J cores use C3P0, which is outdated and slow. Switch to HikariCP: It is significantly faster and handles "dead" connections much better. Also, ensure your characters and items tables are indexed correctly in MySQL. Running a VACUUM or OPTIMIZE TABLE once a week can prevent those annoying "saving player data" spikes. 5. Network Threading In your server settings, look for "Network" or "Thread" configurations. Usually, you’ll see SelectorThreads and WorkerThreads. Selector Threads: Should be equal to the number of physical CPU cores. Worker Threads: This is where the logic happens (skills, movement). If this is too low, actions will "queue up," creating a delay even if your ping is low. 6. Community Board (BBS) Optimization On MaxCheaters, we love fancy Community Boards. However, if your Buffer or Shop script is poorly coded, it might be reloading the entire HTML from the hard drive every time a player clicks a button. The Fix: Ensure your scripts cache the HTML in the RAM. Reading from an SSD is fast, but reading from RAM is thousands of times faster. Conclusion Optimization isn't a "one-click" fix; it’s about finding the balance between your hardware and your software. Start with your JVM flags, clean up your Geodata settings, and make sure your Database isn't choking on old logs. If you found this helpful, leave a comment or a "Thank You" below! If you have specific lag issues with a certain core (aCis, L2Emu, etc.), post your server.properties and I’ll try to help you tune it.
    • Hello all, we are a small team of developers working on two servers right now. One of them is Interlude and the other Gracia Final. Both will be pride-like aiming to make the servers similar to old pride's chronicles, C6 and GF respectively. For those not familiar here's some quick info:  9300x XP / 5500x Adena 1x Drop / 1x Spoil Safe Enchant +3 Start at Level 80 Custom PvP Zones & Reward System  Reworked Buffer Classes Wondrous Cubic All-in-one Panel  For more information visit our discord: https://discord.com/invite/YmCa7kbMuG
    • Up! Can make c4 project too retail x1 if someone is interested
  • 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..