Song of the Hunter
- ID
- 335
- Название
- Song of the Hunter
- start_npcs_json
- [30744]
- npc_ids_json
- [20271,20553,20571,27140,27141,27142,27143,27144,27145,27146,27147,27148,30744,30745,30746]
- constants_json
- {"GREY":30744,"TOR":30745,"CYBELLIN":30746,"BREKA_ORC_WARRIOR":20271,"WINDSUS":20553,"TARLK_BUGBEAR_WARRIOR":20571,"BREKA_OVERLORD_HAKA":27140,"BREKA_OVERLORD_JAKA":27141,"BREKA_OVERLORD_MARKA":27142,"WINDSUS_ALEPH":27143,"TARLK_RAIDER_ATHU":27144,"TARLK_RAIDER_LANKA":27145,"TARLK_RAIDER_TRISKA":27146,"TARLK_RAIDER_MOTURA":27147,"TARLK_RAIDER_KALATH":27148,"CYBELLINS_DAGGER":3471,"CIRCLE_HUNTER_LICENSE1":3692,"CIRCLE_HUNTER_LICENSE2":3693,"LAUREL_LEAF_PIN":3694,"TEST_INSTRUCTIONS1":3695,"TEST_INSTRUCTIONS2":3696,"CYBELLINS_REQUEST":3697,"GUARDIAN_BASILISK_SCALE":3709,"KARUT_WEED":3710,"HAKAS_HEAD":3711,"JAKAS_HEAD":3712,"MARKAS_HEAD":3713,"WINDSUS_ALEPH_SKIN":3714,"INDIGO_RUNESTONE":3715,"SPORESEA_SEED":3716,"TIMAK_ORC_TOTEM":3717,"TRISALIM_SILK":3718,"AMBROSIUS_FRUIT":3719,"BALEFIRE_CRYSTAL":3720,"IMPERIAL_ARROWHEAD":3721,"ATHUS_HEAD":3722,"LANKAS_HEAD":3723,"TRISKAS_HEAD":3724,"MOTURAS_HEAD":3725,"KALATHS_HEAD":3726,"grade_c":12,"grade_b":6,"grade_a":3}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00335_TheSongOfTheHunter/Q00335_TheSongOfTheHunter.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20271 | Breka Orc Warrior | Нет | 33 |
| 20553 | Windsus | Нет | 39 |
| 20571 | Tarlk Bugbear Warrior | Нет | 48 |
| 27140 | Breka Overlord Haka | Нет | 36 |
| 27141 | Breka Overlord Jaka | Нет | 36 |
| 27142 | Breka Overlord Marka | Нет | 36 |
| 27143 | Windsus Aleph | Нет | 42 |
| 27144 | Tarlk Raider Athu | Нет | 48 |
| 27145 | Tarlk Raider Lanka | Нет | 48 |
| 27146 | Tarlk Raider Triska | Нет | 48 |
| 27147 | Tarlk Raider Motura | Нет | 48 |
| 27148 | Tarlk Raider Kalath | Нет | 48 |
| 30744 | Grey | Да | 70 |
| 30745 | Tor | Нет | 70 |
| 30746 | Cybellin | Нет | 70 |
Условия уровней: выражения из Java
if (st.getPlayer().getLevel() < 35) if (st.getPlayer().getLevel() < 45) if (st.getPlayer().getLevel() < 45)
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, (3400 * (int) MathUtil.pow(2, bloodCrystalLevel - 2)), true); giveItems(player, TEST_INSTRUCTIONS1, 1); giveItems(player, TEST_INSTRUCTIONS2, 1); giveAdena(player, 20000, true); giveItems(player, CYBELLINS_DAGGER, 1); giveItems(player, CYBELLINS_REQUEST, 1); giveItems(player, Q_BLOOD_CRYSTAL[1], 1); giveItems(player, requestId, 1); giveItems(player, CIRCLE_HUNTER_LICENSE1, 1); giveItems(player, CIRCLE_HUNTER_LICENSE2, 1); giveItems(player, itemCond[0][0], 1); giveItems(player, HAKAS_HEAD, 1); giveItems(player, JAKAS_HEAD, 1); giveItems(player, MARKAS_HEAD, 1); giveItems(player, ATHUS_HEAD, 1); giveItems(player, LANKAS_HEAD, 1); giveItems(player, TRISKAS_HEAD, 1); giveItems(player, MOTURAS_HEAD, 1); giveItems(player, KALATHS_HEAD, 1); giveItems(player, Q_BLOOD_CRYSTAL[bloodCrystalLevel + 1], 1); giveItems(player, Q_BLOOD_CRYSTAL[0], 1); giveItems(player, request.request_item, 1); giveItems(player, LAUREL_LEAF_PIN, 1); giveAdena(player, reward_adena, true);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30744_01.htm] Hunters Guild Member Grey: Many aspire to join our guild. Many such as you only see the glamorous side of our profession. Becoming a hunter is not an easy task. Only the very best and brightest are selected for membership in the Hunters Guild. A hunting license is only given to those who pass a very severe test. Many give up before a week has passed. Does that sound like you? (This quest is only for characters level 35 and above.)
[30744_02.htm] Hunters Guild Member Grey: Many aspire to join our guild. Many such as you only see the glamorous side of our profession. Becoming a hunter is not an easy task. Only the very best and brightest are selected for membership in the Hunters Guild. A hunting license is only given to those who pass a very severe test. Many give up before a week has passed. Does that sound like you? "I wish to take the test for the hunting license."
[30744_03.htm] Hunters Guild Member Grey: Did I hurt your feelings? Do you actually intend to try for the hunting license? If so, you must listen carefully to my words... There are two types of hunters. Most hunters are 1-circle, but very skillful ones can obtain the 2-circle license by passing another test. Of course you must take the 1-circle license test first. To pass this test, you must bring back at least three of the items on this list. View the list
[30744_04.htm] Hunters Guild Member Grey: Next is the 1-circle hunter license test list. To pass the test, you have to bring at least three items from the list. Keep in mind that this is not just a simple treasure hunt but is a test to find out whether you have the nature and disposition of a hunter! 40 scales of guardian basilisk 20 Karut Weeds 3 heads of raiders with the lord's bounty on their heads Skin of Windsus Aleph 20 light-blue runestones 30 sea of spores seeds
[30744_04a.htm] Hunters Guild Member Grey: You must gather 40 scales of guardian basilisk. They live in the Death Pass. I really shouldn't tell you this... Gathering information about the items is a part of the test. Count yourself lucky to have received this valuable one-time hint! Go back
[30744_04b.htm] Hunters Guild Member Grey: You must gather 20 Karut Weeds, used in the research of mages. The leto Lizardman mediums carry them. You may find the leto lizardmen in the southern part of Oren. Gathering information about the items is a part of the test. Count yourself lucky to have received this valuable one-time hint! Go back
[30744_04c.htm] Hunters Guild Member Grey: You must kill the three evil outlaw Haka brothers and bring back their heads. They are named Haka, Jakja and Marka. They are prefects of the Breka orc tribe. They wantonly attack merchants' carriages, massacre citizens and set fire to their homes. There has been a bounty placed by on their heads by the Lord of Giran, therefore they have been laying low. But with the Breka Orc Warriors destroyed, they are bound to appear seeking revenge. Go back
[30744_04d.htm] Hunters Guild Member Grey: You must bring the skin of the Windsus Aleph. It is a particularly strong and vicious black boar, native to the Giran region. To find him you must go to the Death Pass and hunt windsuses, eventually you will come across the Windsus Aleph. Your arrow must fly the moment you see its face! Go back
[30744_04e.htm] Hunters Guild Member Grey: You must gather 20 light-blue runestones. These runestones are obtained by destroying Manashen Gargoyles or Enchanted Stone Golems in the area near the Ivory Tower. To protect their precious tower from interlopers, the mages apparently have inplanted runestones in the creatures of that area and are controlling them. This is all I will say on this matter. If you are a true hunter, you must gather the information and find the items yourself. Don't expect any more hints! Go back
[30744_04f.htm] Hunters Guild Member Grey: You must gather 30 Sea of Spore Seeds. These can be obtained by going to the Sea of Spores and killing the Giant Fungus. Of course, I should let you discover this for yourself, but I'm just an old softie... No more hints! Go back
[30744_05.htm] Hunters Guild Member Grey: You must obtain at least three items from the list in order to obtain the 1-circle hunting license. Keep in mind that this is not merely a treasure hunt but is a test to find out if you have what it takes to be a hunter! View the list
[30744_06.htm] Hunters Guild Member Grey: You have obtained the items from the list! I must admit that I doubted you at first, but I stand corrected! Well, you certainly qualify as a hunter. I hereby bestow on you the 1-circle hunting license. Welcome to the guild, new hunting brother! Now you are qualified to perform the various tasks that come to our Hunters Guild. Please go and ask Guild Member Tor over there for details. Sometimes you will be assigned jobs by the guild, other times you'll be hired by individuals. Recently Cybellin asked me to introduce him to a trustworthy hunter; would you like to meet him?
[30744_07.htm] Hunters Guild Member Grey: Welcome, my hunter brother. What can I do for you? "Is there any work?" "I wish to test for the 2-circle hunter license." "I wish to leave the Hunters Guild."
[30744_07a.htm] Hunters Guild Member Grey: We get dozens of hunting requests every day. You should speak to Guild Member Tor to find out what requests have currently come in. If there is a job that you like, you can accept it. There is also the possibility of being hired by individuals. Recently Cybellin asked me to introduce him to a trustworthy hunter. Would you care to meet him? Go back
[30744_07b.htm] Hunters Guild Member Grey: You are already applying for the 2-circle hunting license? Nice to see that you don't lack ambition! But look. You're not ready. You do have some skills but you still need more important practical experience. For the time being, you should develop your talents while carrying out hunting requests. (You can apply for the 2-circle license test after reaching level 45.)
[30744_08.htm] Hunters Guild Member Grey: Welcome, my hunter brother. What can I do for you? "Are there any jobs?" "I wish to test for the 2-circle hunting license." Leave the Hunters Guild
[30744_08a.htm] Hunters Guild Member Grey: We get dozens of hunting requests every day. You should see Guild Member Tor, he will know what requests have come in. If there is a job that you like, you can accept it. Hunters are also hired by individuals, not just through the guild. Recently Cybellin asked me to introduce him to a trustworthy hunter. Would you care to meet him? Go back
[30744_09.htm] Hunters Guild Member Grey: So, you wish to take the 2-circle hunting license test? Well I suppose you're up to giving it a try. As before, in the 2-circle test you must bring back at least three items written on the list. Of course, these items will be harder to obtain than those of the 1-circle test. Maybe you should look at the list first... View list
[30744_09a.htm] Hunters Guild Member Grey: Still taking the test, are you? Come and see me when you've finished.
[30744_10.htm] Hunters Guild Member Grey: Here is the 2-circle hunting license test list. You must bring 20 Timak Orc Totems 20 skeins of trisalim cobweb 30 Ambrosius Fruits 20 Balefire Crystals 20 Imperial Arrowheads The heads of 5 outlaw raiders
[30744_10a.htm] Hunters Guild Member Grey: You must gather 20 Timak Orc Totems. To obtain them you must kill Timak Orc Warriors. You should have no trouble with this. Now go! Go back
[30744_10b.htm] Hunters Guild Member Grey: You must gather 20 trisalim cobwebs. This should be no problem for you. Quickly now! Get them and come back to me! Go back
[30744_10c.htm] Hunters Guild Member Grey: You must gather 30 Ambrosius Fruits. You are familiar with ambrosius, aren't you? It's a fruit somewhat like an apple that grows on valley treants in Enchanted Valley. This should be easy for you! Go back
[30744_10d.htm] Hunters Guild Member Grey: You must gather twenty Balefire Crystals. Actually, I didn't know what this was so I asked the sorcerers about it. They said it could be obtained if you kill a Tairim in the Cemetery. This hint should be of great value to you. Go back
[30744_10e.htm] Hunters Guild Member Grey: You must gather 20 Imperial Arrowheads. This should be easy for you. If you go to the National Cemetery and kill the undead archers, you can obtain arrowheads made during the Elmoreden era. Are you up for it? Go back
[30744_10f.htm] Hunters Guild Member Grey: You must kill five talk bugbear raiders and bring back their heads. Their names are Athu, Triska, Motura and Lanka, and they are led by one called Kalath. These Talk Bugbear Warriors have been attacking and pillaging merchant carriages. I'm sure you would deal with these outlaws even if it weren't a requirement of the test, wouldn't you? Go back
[30744_11.htm] Hunters Guild Member Grey: How is the hunt going? Once again, you must bring at least three items from the list. This should be well within your abilities. Good luck! View list
[30744_12.htm] Hunters Guild Member Grey: Good work! I knew that you would complete the test without much trouble. Now you are a respectable 2-circle hunter. Congratulations! Now you are qualified for more dangerous hunts. Go see Guild Member Tor. Or perhaps you should visit Cybellin. He is still looking for a good hunter...
[30744_14.htm] Hunters Guild Member Grey: Hello, hunter brother. What can I do for you? "Are there any jobs?" "I wish to leave the Hunters Guild."
[30744_14a.htm] Hunters Guild Member Grey: We get dozens of hunting requests every day. You should go to Guild Member Tor to find out what requests have currently come in. If there is an assignment that appeals to you, you can accept it. There are also individuals who wish to hire hunters. Recently Cybellin asked me if I knew of a trustworthy hunter. Would you like to meet her? Go back
[30744_15.htm] Hunters Guild Member Grey: You wish to leave the guild? Certainly you know that is impossible. Once you join this brotherhood you are in for life... Didn't you know that?... You should reconsider your decision... ...The fear in your eyes makes it impossible for me to keep a straight face! I'm joking, you idiot! Of course you can leave if that is what you really want... You must have a good reason... Leave Cancel
[30744_16.htm] Hunters Guild Member Grey: Oh, too bad. There are not enough youngsters like you around these days... But if you have your heart set on leaving, then I won't stop you... May all of your wishes come true... May the divine protection of the gods be with you...
[30744_17.htm] Hunters Guild Member Grey: Oh, too bad. There aren't enough youngsters like you around these days... But if you have your mind made up, then I won't stop you... May all your wishes come true... Here is a small bonus for your work for the guild. You can use it for travel expenses. OK, well, this is goodbye. May the divine protection of the gods be with you...
[30744_18.htm] Hunters Guild Member Grey: Ah, an excellent decision! The life of a hunter is full of romance and adventure each day... There is truly nothing like it in the kingdom! Please keep up the good work!
[30745-3727.htm] Guild Member Tor: Details of the Request: Obtain 40 charms of Kadesh. The charm bears the image of Kadesh, the evil spirit worshiped by leto lizardmen. It is known that leto Lizardman archers and soldiers carry the charm as an amulet to invoke magical power. Request Class: C
[30745-3728.htm] Guild Member Tor: Details of the Request: Collect 50 Timak Jade Necklaces. This necklace is worn by Timak Orc Warriors and overlords to invoke magical power. Request Class: C
[30745-3729.htm] Guild Member Tor: Details of the Request: Demolish the broken enchanted stone golem, gather 50 Enchanted Golem Shards and bring them back to me. Request Class: C
[30745-3730.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 pieces of Giant Monster Eye Meat. Request Class: C
[30745-3731.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Dire Wyrm Eggs. Request Class: C
[30745-3732.htm] Guild Member Tor: Details of the Request: Collect and bring back 100 guardian basilisk talons. Request Class: C
[30745-3733.htm] Guild Member Tor: Details of the Request: Collect and bring back 50 revenants chains. This Steel chain reeking of dark magic is only obtained by defeating a fettered soul. Request Class: C
[30745-3734.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 Windsus Tusks. Request Class: C
[30745-3735.htm] Guild Member Tor: Details of the Request: Collect and bring back 100 Grandis Skulls. Request Class: C
[30745-3736.htm] Guild Member Tor: Details of the Request: Collect and bring back 50 Taik Obsidian Amulets. You must defeat an archer or warrior of the Taik orc tribe to obtain this amulet. Request Class: C
[30745-3737.htm] Guild Member Tor: Details of the Request: Kill the karul bugbears that are terrorizing the south of Aden and bring back their heads. Request Class: C
[30745-3738.htm] Guild Member Tor: Details of the Request: Collect 40 Tamlin Ivory Charms. This charm is obtained by killing a tamlin orc. Request Class: C
[30745-3739.htm] Guild Member Tor: Details of the Request: Bring me the head of Elder Narak of the leto lizardmen. The overlords of that vile tribe will lead you to him. Request Class: B
[30745-3740.htm] Guild Member Tor: Details of the Request: Collect and bring back 50 Enchanted Gargoyle Horns. Request Class: B
[30745-3741.htm] Guild Member Tor: Details of the Request: Collect and bring back 50 Coiled Serpent Totems. This totem, sacred to the breka orcs, can be obtained by defeating a breka Orc Warrior or shaman. Request Class: B
[30745-3742.htm] Guild Member Tor: Details of the Request: Bring me the totem of the Serpent Demon Kadesh. It is in the possession of leto Lizardman shaman Kets. If you follow the shamans of that vile tribe they will lead you to Kets. Request Class: B
[30745-3743.htm] Guild Member Tor: Details of the Request: Bring me the head of Kaikis, captain of the Timak orc raiders. Start killing Timak Orc Warriors and eventually Kaiki will make his appearance. Request Class: B
[30745-3744.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 Kronbe Venom Sacs. Request Class: B
[30745-3745.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 charms of Eva. These charms may be obtained by slaying spore zombies, the undead souls of Elven warriors killed in battle at the Sea of Spores. Request Class: A
[30745-3746.htm] Guild Member Tor: Details of the Request: Recover the precious stone tablet that was stolen from a Dwarven cargo wagon by grandis. It is currently in the possession of grandis brigand leader Gok Magok. If you slay the grandis one by one, eventually you will find Gok Magok. Request Class: A
[30745-3747.htm] Guild Member Tor: Details of the Request: Recover the precious Book of Shunaiman that was stolen from pilgrims to the grand temple of Einhasad. It is in the possession of Orooto, chief of the karul bugbears. To find him you will need to kill the karul bugbears one by one, Orooto will eventually make his appearance. Kill him and recover the Book of Shunaiman. Request Class: A
[30745-3748.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Rotting Tree Spores from the Sea of Spores. Request Class: C
[30745-3749.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Trisalim Venom Sacs. Request Class: C
[30745-3750.htm] Guild Member Tor: Details of the Request: Collect and bring back 50 Taik Orc Totems. This totem can be obtained by slaying Taik orc shamans or warriors. Request Class: C
[30745-3751.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 harit Lizardman barbed necklaces. These can be obtained by killing harit Lizardman soldiers, archers or warriors. Request Class: C
[30745-3752.htm] Guild Member Tor: Details of the Request: Collect and bring back 20 coins of the old empire. You may obtain these coins by killing hatar ratman bandits of the Plains of Fierce Battle and their leaders. Request Class: C
[30745-3753.htm] Guild Member Tor: Details of the Request: Kill 30 farcrans and bring back their skins. It is a monstrous beast that inhabits the area near the Plains of Fierce Battle. Request Class: C
[30745-3754.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Tempest Shards. To obtain these shards you must kill flines, spirits of wind. Request Class: C
[30745-3755.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Tsunami Shards. To obtain them you must kill lieles, spirits of water, who live in the Enchanted Forest. Request Class: C
[30745-3756.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Satyr Manes. To obtain them you must kill satyrs or satyr elders who live in the Enchanted Valley. Request Class: C
[30745-3757.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 Hamadryad Shards. To obtain them you must kill forest runners and spirits of trees who live in the Enchanted Forest. Request Class: C
[30745-3758.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 Shillien Manes. To obtain them you must kill soldiers, scouts or warriors of the vanor silenos tribe that have been running amok in the north of Aden. Request Class: C
[30745-3759.htm] Guild Member Tor: Details of the Request: Collect and bring back 30 tarlk bugbear totems. To obtain them you must kill tarlk bugbear warriors that are encamped in the den of the mountain bandits in the north of Oren. Request Class: C
[30745-3760.htm] Guild Member Tor: Details of the Request: Bring me the head of Okun, the timak orc overlord. He is notorious for being an abominably cruel marauder. If you kill timak orc overlords one by one, Okun will show up to take his revenge. Request Class: B
[30745-3761.htm] Guild Member Tor: Details of the Request: Bring me the head of Kakran, taik orc overlord. If you start killing taik orc captains one by one, Kakran will show up crying out for revenge. Request Class: B
[30745-3762.htm] Guild Member Tor: Details of the Request: Collect and bring back 40 narcissus soulstones. These rare soulstones are obtained by breaking the mirrors in the Forest of Mirrors. Request Class: B
[30745-3763.htm] Guild Member Tor: Details of the Request: Collect and bring back 20 Deprive Eyes. These evil spirits are hovering around the Plains of Fierce Battle. Request Class: B
[30745-3764.htm] Guild Member Tor: Details of the Request: Collect and bring back 20 horns of summon unicorn. They are found in the Enchanted Valley. Request Class: B
[30745-3765.htm] Guild Member Tor: Details of the Request: Bring me the golden mane of Kerunos, chief of the vanor silenos tribe. If you start killing vanor silenos chiefs, Kerunos will appear. Request Class: B
[30745-3766.htm] Guild Member Tor: Details of the Request: Bring back 20 skulls of undead executed criminals. These vagrant spirits have wandered aimlessly about the Cemetery of Kings since ancient times. Request Class: A
[30745-3767.htm] Guild Member Tor: Details of the Request: Recover the stolen bust of the late King Travis. It is said to be in the possession of Chief Kuber of the hatar ratmen. If you slay hatar ratman Brigand Leaders one by one, Kuber will appear. Request Class: A
[30745-3768.htm] Guild Member Tor: Details of the Request: Recover 10 swords of Cadmus from the Blazing Swamp. These swords are in the possession of the undead called judges of the marsh. These creatures are the souls of heroic bodyguards who died defending their king during the Elmoreden war. You must kill them to retrieve the swords of Cadmus. Request Class: A
[30745_01a.htm] Guild Member Tor: Everyday our guild receives dozens of requests from people of all walks of life. From a village matron seeking to recover her dearly departed grandmother's brooch, to aristocrats seeking to plunder the treasure of ancient empires, they all come to us. If you wish to accept a request, you must first obtain a hunting license. Guild member Grey can tell you more!
[30745_01b.htm] Guild Member Tor: Everyday our guild receives dozens of requests from people of all walks of life. From a village matron seeking to recover her dearly departed grandmother's brooch, to aristocrats seeking to plunder the treasure of ancient empires, they all come to us. Would you consider taking a request? "I would like to take on a request."
[30745_02.htm] Guild Member Tor: Examine the list and choose a request you would like to work on. The requests are divided into 3 classes according to their degree of difficulty and amount of reward. Class C is the most common, of moderate difficulty and reward. Class B is more difficult but with a better reward. We rarely receive Class A requests. They are the most difficult and offer the greatest rewards. Examine the request list
[30745_03.htm] Guild Member Tor: Oh I see that you are taking the test to obtain a hunting license. I'm sure you will make an excellent circle 2 hunter! Our policy states that those who are currently taking the hunting license test cannot accept a request. Good luck on the test! Come back when you pass it.
[30745_03a.htm] Guild Member Tor: Are you aware of the separate request list just for circle 2 hunters? Considering your skills and experience, I recommend that you take the test to obtain the circle 2 hunting license. You should visit Guild Member Gray. "I would like to take on a request."
[30745_03b.htm] Guild Member Tor: Pleased to meet you, brother! Is there anything I can help you with? "I would like to take on a request."
[30745_04.htm] Guild Member Tor: Examine the list and choose a request you would like to work on. The requests are divided into 3 classes according to their degree of difficulty and amount of reward. Class C is the most common, of moderate difficulty and reward. Class B is more difficult but with a better reward. We rarely receive Class A requests. They are the most difficult and offer the greatest rewards. Examine the request list
[30745_05.htm] Guild Member Tor: Nice to meet you, brother! Is there anything I can help you with? Discontinue mission Continue mission
[30745_05a.htm] Guild Member Tor: Canceling an assigned request before completion incurs a penalty of all your Laurel Leaf Pins. A small price for violating the trust of the guild, wouldn't you say? Do you still wish to give up on your assigned request? Give up assigned request Continue working on assigned request
[30745_05b.htm] Guild Member Tor: Well, it seems you have your mind made up, I won't try to change it. I will confiscate all of your Laurel Leaf Pins. I hope in the future you will learn to fulfill your obligations.
[30745_05c.htm] Guild Member Tor: Do you know the importance of fulfilling your obligations? Do you know the meanings of integrity, diligence and reliability? Those are the cornerstones of our guild! Well, good luck with your hunting!
[30745_06a.htm] Guild Member Tor: Good work! Here is your reward. Also, please accept this Laurel Leaf Pin that recognizes the successful fulfillment of a request. The more pins you possess, the better chance you will receive class A and B requests. Do you wish to undertake a new request? "I would like to receive a new request." "I need a break."
[30745_06b.htm] Guild Member Tor: Good work! Here is your reward. Also, please accept this Laurel Leaf Pin that recognizes the successful fulfillment of a request. The more pins you possess, the better the chance you will receive class A and B requests. Do you wish to undertake a new request? "I would like to receive a new request." "I need a break."
[30745_09.htm] Guild Member Tor: Alright then, have a good rest. Come back when you would like to choose a new request.
[30746_01.htm] Cybellin: Are you a hunter? Oh yes, of course. Just an aspirant. That's too bad. I need a favor from a real hunter.
[30746_02.htm] Cybellin: Ah, a hunter! Oh, how marvelous! I need to ask you a favor. It's related to some very important research I've been performing recently... How about it? Will you assist me? "I will help."
[30746_03.htm] Cybellin: Excellent! Take this Blood Crystal and dagger. Use the dagger to kill the evil Leto Lizardmen and Harit Lizardmen and the crystal to absorb their blood. This will raise the purity of the crystal above its current level of 1. Although this may seem quite simple, the process is not without risks. In addition to the danger posed by the lizardmen, there is a chance each time that the crystal will shatter, that is, the crystal will either increase in purity or be destroyed. If you successfully raise the purity of the crystal and bring it to me, you shall receive a reward. The higher the level of purity, the greater your reward will be. There are different theories as to why the crystal reacts like this to the blood of the lizardmen, possibly it is because these evil lizards are descended from dragons! You will find that certain grades of blood are very effective and others have no effect at all. This can only be determined by trial and error... I have written down this task for you.
[30746_03a.htm] Cybellin: After you kill the Leto Lizardmen and Harit Lizardmen with that dagger, you must use the Blood Crystal to absorb their blood. When you raise the purity of the crystal and return it to me, I shall give you a reward. The higher the level of purity, the greater your reward will be. There is an element of risk, however, as each time it is possible that the crystal will be destroyed. You will find that certain grades of blood are useful and some grades have no effect at all on the Blood Crystal. This can only be determined by trial and error...
[30746_04.htm] Cybellin: The purity of the crystal is still at level 1! Have you decided not to carry out my request? "How can I raise the purity of the crystal?" Continue Quit
[30746_05.htm] Cybellin: You have raised the purity of the Blood Crystal! Would you like to try increasing it some more or do you wish to give it to me at its current level? It doesn't matter to me, but you should remember that the higher level of crystal that you bring me, the greater your reward will be. "Take the jewel at its current level." "I will attempt to raise the level of the crystal." Quit
[30746_05a.htm] Cybellin: You have successfully created a Blood Crystal of level 10 purity! Oh my Shilen! That's awesome! As I promised, I will pay you the reward money. Thank you so very much! Well, may I ask you to do me another favor? Tell her that you will take up the task. Quit
[30746_06.htm] Cybellin: Excellent! You shall receive your reward based on the level of purity of the Blood Crystal. Good job! Could I ask you another favor? "I will do another favor for you." "No, just give me the reward and I'll be on my way."
[30746_07.htm] Cybellin: Fine, I will explain my request. You must increase the purity of a Blood Crystal and bring it to me. This is accomplished by dipping the crystal in the blood of Leto Lizardmen and Harit Lizardmen after you kill them with the dagger I gave you. If you are able to increase the crystal's purity to a level of 10 without destroying it, I will use my entire fortune to procure your reward!
[30746_08.htm] Cybellin: Hunter, will you continue to help me? "Yes." "No."
[30746_09.htm] Cybellin: Ah, yes... Shattered... The crystal's structure was unstable and it failed. Don't be discouraged. Here is another crystal, will you please try again? "Yes." "No."
[30746_10.htm] Cybellin: Thank you for your help. May Shilen protect you...
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00335_TheSongOfTheHunter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.network.enums.ChatType;
import org.l2jmobius.gameserver.util.MathUtil;
/**
* Adapted from FirstTeam Interlude
*/
public class Q00335_TheSongOfTheHunter extends Quest
{
private static final int GREY = 30744;
private static final int TOR = 30745;
private static final int CYBELLIN = 30746;
private static final int BREKA_ORC_WARRIOR = 20271;
private static final int WINDSUS = 20553;
private static final int TARLK_BUGBEAR_WARRIOR = 20571;
private static final int BREKA_OVERLORD_HAKA = 27140;
private static final int BREKA_OVERLORD_JAKA = 27141;
private static final int BREKA_OVERLORD_MARKA = 27142;
private static final int WINDSUS_ALEPH = 27143;
private static final int TARLK_RAIDER_ATHU = 27144;
private static final int TARLK_RAIDER_LANKA = 27145;
private static final int TARLK_RAIDER_TRISKA = 27146;
private static final int TARLK_RAIDER_MOTURA = 27147;
private static final int TARLK_RAIDER_KALATH = 27148;
private static final int CYBELLINS_DAGGER = 3471;
private static final int CIRCLE_HUNTER_LICENSE1 = 3692;
private static final int CIRCLE_HUNTER_LICENSE2 = 3693;
private static final int LAUREL_LEAF_PIN = 3694;
private static final int TEST_INSTRUCTIONS1 = 3695;
private static final int TEST_INSTRUCTIONS2 = 3696;
private static final int CYBELLINS_REQUEST = 3697;
private static final int GUARDIAN_BASILISK_SCALE = 3709;
private static final int KARUT_WEED = 3710;
private static final int HAKAS_HEAD = 3711;
private static final int JAKAS_HEAD = 3712;
private static final int MARKAS_HEAD = 3713;
private static final int WINDSUS_ALEPH_SKIN = 3714;
private static final int INDIGO_RUNESTONE = 3715;
private static final int SPORESEA_SEED = 3716;
private static final int TIMAK_ORC_TOTEM = 3717;
private static final int TRISALIM_SILK = 3718;
private static final int AMBROSIUS_FRUIT = 3719;
private static final int BALEFIRE_CRYSTAL = 3720;
private static final int IMPERIAL_ARROWHEAD = 3721;
private static final int ATHUS_HEAD = 3722;
private static final int LANKAS_HEAD = 3723;
private static final int TRISKAS_HEAD = 3724;
private static final int MOTURAS_HEAD = 3725;
private static final int KALATHS_HEAD = 3726;
// @formatter:off
private static final int[] Q_BLOOD_CRYSTAL =
{
3708, 3698, 3699, 3700, 3701, 3702, 3703, 3704, 3705, 3706, 3707
};
private static final int[] Q_BLOOD_CRYSTAL_LIZARDMEN =
{
20578, 20579, 20580, 20581, 20582, 20641, 20642, 20643, 20644, 20645
};
private static final int[][][] ITEMS_1ST_CIRCLE =
{
{{GUARDIAN_BASILISK_SCALE}, {40}, {20550, 75}},
{{KARUT_WEED}, {20}, {20581, 50}},
{{HAKAS_HEAD, JAKAS_HEAD, MARKAS_HEAD}, {3}},
{{WINDSUS_ALEPH_SKIN}, {1}, {WINDSUS_ALEPH, 100}},
{{INDIGO_RUNESTONE}, {20}, {20563, 50}, {20565, 50}},
{{SPORESEA_SEED}, {30}, {20555, 70}}
};
private static final int[][][] ITEMS_2ND_CIRCLE =
{
{{TIMAK_ORC_TOTEM}, {20}, {20586, 50}},
{{TRISALIM_SILK}, {20}, {20560, 50}, {20561, 50}},
{{AMBROSIUS_FRUIT}, {30}, {20591, 75}, {20597, 75}},
{{BALEFIRE_CRYSTAL}, {20}, {20675, 50}},
{{IMPERIAL_ARROWHEAD}, {20}, {20660, 50}},
{{ATHUS_HEAD, LANKAS_HEAD, TRISKAS_HEAD, MOTURAS_HEAD, KALATHS_HEAD}, {5}}
};
// @formatter:on
private static final Request[] REQUESTS1 =
{
new Request(3727, 3769, 40, 4500, "C: 40 Totems of Kadesh").addDrop(20578, 80).addDrop(20579, 83),
new Request(3728, 3770, 50, 7500, "C: 50 Jade Necklaces of Timak").addDrop(20586, 89).addDrop(20588, 100),
new Request(3729, 3771, 50, 7300, "C: 50 Enchanted Golem Shards").addDrop(20565, 100),
new Request(3730, 3772, 30, 5500, "C: 30 Pieces Monster Eye Meat").addDrop(20556, 50),
new Request(3731, 3773, 40, 5000, "C: 40 Eggs of Dire Wyrm").addDrop(20557, 80),
new Request(3732, 3774, 100, 6500, "C: 100 Claws of Guardian Basilisk").addDrop(20550, 150),
new Request(3733, 3775, 50, 4400, "C: 50 Revenant Chains").addDrop(20552, 100),
new Request(3734, 3776, 30, 5200, "C: 30 Windsus Tusks").addDrop(WINDSUS, 50),
new Request(3735, 3777, 100, 7600, "C: 100 Skulls of Grandis").addDrop(20554, 200),
new Request(3736, 3778, 50, 4900, "C: 50 Taik Obsidian Amulets").addDrop(20631, 100).addDrop(20632, 93),
new Request(3737, 3779, 30, 7600, "C: 30 Heads of Karul Bugbear").addDrop(20600, 50),
new Request(3738, 3780, 40, 7200, "C: 40 Ivory Charms of Tamlin").addDrop(20601, 62).addDrop(20602, 80),
new Request(3739, 3781, 1, 4500, "B: Situation Preparation - Leto Chief").addSpawn(20582, 27157, 10).addDrop(27157, 100),
new Request(3740, 3782, 50, 9500, "B: 50 Enchanted Gargoyle Horns").addDrop(20567, 50),
new Request(3741, 3783, 50, 5800, "B: 50 Coiled Serpent Totems").addDrop(20269, 93).addDrop(BREKA_ORC_WARRIOR, 100),
new Request(3742, 3784, 1, 4500, "B: Situation Preparation - Sorcerer Catch of Leto").addSpawn(20581, 27156, 10).addDrop(27156, 100),
new Request(3743, 3785, 1, 7000, "B: Situation Preparation - Timak Raider Kaikee").addSpawn(20586, 27158, 10).addDrop(27158, 100),
new Request(3744, 3786, 30, 10000, "B: 30 Kronbe Venom Sacs").addDrop(20603, 50),
new Request(3745, 3787, 30, 18000, "A: 30 Eva's Charm").addDrop(20562, 50),
new Request(3746, 3788, 1, 12000, "A: Titan's Tablet").addSpawn(20554, 27160, 10).addDrop(27160, 100),
new Request(3747, 3789, 1, 15000, "A: Book of Shunaiman").addSpawn(20600, 27164, 10).addDrop(27164, 100)
};
private static final Request[] REQUESTS2 =
{
new Request(3748, 3790, 40, 6200, "C: 40 Rotting Tree Spores").addDrop(20558, 67),
new Request(3749, 3791, 40, 5900, "C: 40 Trisalim Venom Sacs").addDrop(20560, 66).addDrop(20561, 75),
new Request(3750, 3792, 50, 7200, "C: 50 Totems of Taik Orc").addDrop(20633, 53).addDrop(20634, 99),
new Request(3751, 3793, 40, 7200, "C: 40 Harit Barbed Necklaces").addDrop(20641, 88).addDrop(20642, 88).addDrop(20643, 91),
new Request(3752, 3794, 20, 8700, "C: 20 Coins of Ancient Empire").addDrop(20661, 50).addSpawn(20661, 27149, 5).addDrop(20662, 52).addSpawn(20662, 27149, 5).addDrop(27149, 300),
new Request(3753, 3795, 30, 11600, "C: 30 Skins of Farkran").addDrop(20667, 90),
new Request(3754, 3796, 40, 6200, "C: 40 Tempest Shards").addDrop(20589, 49).addSpawn(20589, 27149, 5).addDrop(27149, 500),
new Request(3755, 3797, 40, 7800, "C: 40 Tsunami Shards").addDrop(20590, 51).addSpawn(20590, 27149, 5).addDrop(27149, 500),
new Request(3756, 3798, 40, 7800, "C: 40 Manes of Pan Ruem").addDrop(20592, 80).addDrop(20598, 100),
new Request(3757, 3799, 40, 7000, "C: 40 Hamadryad Shard").addDrop(20594, 64).addSpawn(20594, 27149, 5).addDrop(27149, 500),
new Request(3758, 3800, 30, 7100, "C: 30 Manes of Vanor Silenos").addDrop(20682, 70).addDrop(20683, 85).addDrop(20684, 90),
new Request(3759, 3801, 30, 13400, "C: 30 Totems of Tarlk Bugbears").addDrop(TARLK_BUGBEAR_WARRIOR, 63),
new Request(3760, 3802, 1, 8200, "B: Situation Preparation - Overlord Okun of Timak").addSpawn(20588, 27159, 10).addDrop(27159, 100),
new Request(3761, 3803, 1, 5300, "B: Situation Preparation - Overlord Kakran of Taik").addSpawn(20634, 27161, 10).addDrop(27161, 100),
new Request(3762, 3804, 40, 8800, "B: 40 Narcissus Soulstones").addDrop(20639, 86).addSpawn(20639, 27149, 5).addDrop(27149, 500),
new Request(3763, 3805, 20, 11000, "B: 20 Eyes of Deprived").addDrop(20664, 77),
new Request(3764, 3806, 20, 8800, "B: 20 Unicorn Horns").addDrop(20593, 68).addDrop(20599, 86),
new Request(3765, 3807, 1, 5500, "B: Golden Mane of Silenos").addSpawn(20686, 27163, 10).addDrop(27163, 100),
new Request(3766, 3808, 20, 16000, "A: 20 Skulls of Executed Person").addDrop(20659, 73),
new Request(3767, 3809, 1, 18000, "A: Bust of Travis").addSpawn(20662, 27162, 10).addDrop(27162, 100),
new Request(3768, 3810, 10, 18000, "A: 10 Swords of Cadmus").addDrop(20676, 64)
};
public Q00335_TheSongOfTheHunter()
{
super(335, "Song of the Hunter");
addStartNpc(GREY);
addTalkId(GREY, CYBELLIN, TOR);
addKillId(BREKA_OVERLORD_HAKA);
addKillId(BREKA_OVERLORD_JAKA);
addKillId(BREKA_OVERLORD_MARKA);
addKillId(TARLK_RAIDER_ATHU);
addKillId(TARLK_RAIDER_LANKA);
addKillId(TARLK_RAIDER_TRISKA);
addKillId(TARLK_RAIDER_MOTURA);
addKillId(TARLK_RAIDER_KALATH);
addKillId(Q_BLOOD_CRYSTAL_LIZARDMEN);
final List<Integer> questItems = new ArrayList<>();
for (int[][] ItemsCond : ITEMS_1ST_CIRCLE)
{
for (int i : ItemsCond[0])
{
questItems.add(i);
}
for (int i = 2; i < ItemsCond.length; ++i)
{
addKillId(ItemsCond[i][0]);
}
}
for (int[][] ItemsCond : ITEMS_2ND_CIRCLE)
{
for (int i : ItemsCond[0])
{
questItems.add(i);
}
for (int i = 2; i < ItemsCond.length; ++i)
{
addKillId(ItemsCond[i][0]);
}
}
for (Request r : REQUESTS1)
{
questItems.add(r.request_id);
questItems.add(r.request_item);
for (int id : r.droplist.keySet())
{
addKillId(id);
}
for (int id : r.spawnlist.keySet())
{
addKillId(id);
}
}
for (Request r : REQUESTS2)
{
questItems.add(r.request_id);
questItems.add(r.request_item);
for (int id : r.droplist.keySet())
{
addKillId(id);
}
for (int id : r.spawnlist.keySet())
{
addKillId(id);
}
}
questItems.add(CIRCLE_HUNTER_LICENSE1);
questItems.add(CIRCLE_HUNTER_LICENSE2);
questItems.add(LAUREL_LEAF_PIN);
questItems.add(TEST_INSTRUCTIONS1);
questItems.add(TEST_INSTRUCTIONS2);
questItems.add(CYBELLINS_REQUEST);
questItems.add(CYBELLINS_DAGGER);
for (int i : Q_BLOOD_CRYSTAL)
{
questItems.add(i);
}
registerQuestItems(questItems.stream().mapToInt(i -> i).toArray());
}
private static int calcItemsConds(Player player, int[][][] itemConds)
{
int result = 0;
for (int[][] itemCond : itemConds)
{
int count = 0;
for (int i : itemCond[0])
{
count += getQuestItemsCount(player, i);
}
if (count >= itemCond[1][0])
{
++result;
}
}
return result;
}
private void delItemsConds(Player player, int[][][] itemConds)
{
for (int[][] itemCond : itemConds)
{
for (int i : itemCond[0])
{
takeItems(player, i, -1);
}
}
}
private static int getBloodCrystalLevel(Player player)
{
for (int i = Q_BLOOD_CRYSTAL.length - 1; i >= 0; --i)
{
if (getQuestItemsCount(player, Q_BLOOD_CRYSTAL[i]) > 0)
{
return i;
}
}
return -1;
}
private static boolean bloodCrystal2Adena(Player player, int bloodCrystalLevel)
{
if (bloodCrystalLevel < 2)
{
return false;
}
for (int i : Q_BLOOD_CRYSTAL)
{
takeItems(player, i, -1);
}
giveAdena(player, (3400 * (int) MathUtil.pow(2, bloodCrystalLevel - 2)), true);
return true;
}
private void genList(QuestState st)
{
// final int grade_c = 12;
// final int grade_b = 6;
// final int grade_a = 3;
if ((st.get("list") == null) || st.get("list").isEmpty())
{
final long laurelLeafPinCount = getQuestItemsCount(st.getPlayer(), LAUREL_LEAF_PIN);
final int[] list = new int[5];
if (laurelLeafPinCount < 4L)
{
if ((laurelLeafPinCount == 0) || (getRandom(100) < 80))
{
for (int i = 0; i < 5; ++i)
{
list[i] = getRandom(12);
}
}
else
{
list[0] = 12 + getRandom(6);
list[1] = getRandom(12);
list[2] = getRandom(6);
list[3] = 6 + getRandom(6);
list[4] = getRandom(12);
}
}
else if (getRandom(100) < 20)
{
list[0] = 12 + getRandom(6);
list[1] = getRandom(100) < 5 ? (18 + getRandom(3)) : getRandom(12);
list[2] = getRandom(6);
list[3] = 6 + getRandom(6);
list[4] = getRandom(12);
}
else
{
list[0] = getRandom(12);
list[1] = getRandom(100) < 5 ? (18 + getRandom(3)) : getRandom(12);
list[2] = getRandom(6);
list[3] = 6 + getRandom(6);
list[4] = getRandom(12);
}
boolean sortFlag;
do
{
sortFlag = false;
for (int j = 1; j < list.length; ++j)
{
if (list[j] < list[j - 1])
{
final int tmp = list[j];
list[j] = list[j - 1];
list[j - 1] = tmp;
sortFlag = true;
}
}
}
while (sortFlag);
int packedlist = 0;
try
{
packedlist = packInt(list, 5);
}
catch (Exception e)
{
// Ignore.
}
st.set("list", String.valueOf(packedlist));
}
}
private static String formatList(QuestState st, Request[] requests)
{
String result = "<html><head><body>Guild Member Tor:<br>%reply%<br>%reply%<br>%reply%<br>%reply%<br>%reply%<br></body></html>";
final int[] listpacked = unpackInt(st.getInt("list"), 5);
for (int i = 0; i <= 5; ++i)
{
final String s = "<a action=\"bypass Script Q00335_TheSongOfTheHunter 30745-request-" + requests[listpacked[i]].request_id + "\">" + requests[listpacked[i]].text + "</a>";
result = result.replaceFirst("%reply%", s);
}
return result;
}
private static Request getCurrentRequest(Player player, Request[] requests)
{
for (Request r : requests)
{
if (getQuestItemsCount(player, r.request_id) > 0)
{
return r;
}
}
return null;
}
private static boolean isValidRequest(int id)
{
for (Request r : REQUESTS1)
{
if (r.request_id == id)
{
return true;
}
}
for (Request r : REQUESTS2)
{
if (r.request_id == id)
{
return true;
}
}
return false;
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
final QuestState st = player.getQuestState(getName());
if (st == null)
{
return event;
}
String htmltext = event;
final int state = st.getState();
if ("30744_03.htm".equals(htmltext))
{
if (state == 1)
{
if (getQuestItemsCount(player, TEST_INSTRUCTIONS1) == 0)
{
giveItems(player, TEST_INSTRUCTIONS1, 1);
}
st.startQuest();
}
}
else if ("30744_09.htm".equals(htmltext))
{
if (state == 2)
{
if (getCurrentRequest(player, REQUESTS1) != null)
{
return "30744_09a.htm";
}
if (getQuestItemsCount(player, TEST_INSTRUCTIONS2) == 0)
{
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
giveItems(player, TEST_INSTRUCTIONS2, 1);
}
}
}
else if ("30744_16.htm".equals(htmltext))
{
if (state == 2)
{
if (getQuestItemsCount(player, LAUREL_LEAF_PIN) >= 20)
{
giveAdena(player, 20000, true);
htmltext = "30744_17.htm";
}
st.exitQuest(true, true);
}
}
else if ("30746_03.htm".equals(htmltext))
{
if (state == 2)
{
if ((getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) == 0) && (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) == 0))
{
return null;
}
if (getQuestItemsCount(player, CYBELLINS_DAGGER) == 0)
{
giveItems(player, CYBELLINS_DAGGER, 1);
}
if (getQuestItemsCount(player, CYBELLINS_REQUEST) == 0)
{
giveItems(player, CYBELLINS_REQUEST, 1);
}
for (int i : Q_BLOOD_CRYSTAL)
{
takeItems(player, i, -1);
}
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
giveItems(player, Q_BLOOD_CRYSTAL[1], 1);
}
}
else if ("30746_06.htm".equals(htmltext))
{
if ((state == 2) && !bloodCrystal2Adena(player, getBloodCrystalLevel(player)))
{
return null;
}
}
else if ("30746_10.htm".equals(htmltext))
{
if (state == 2)
{
takeItems(player, CYBELLINS_DAGGER, -1);
takeItems(player, CYBELLINS_REQUEST, -1);
for (int i : Q_BLOOD_CRYSTAL)
{
takeItems(player, i, -1);
}
}
}
else if ("30745_02.htm".equals(htmltext))
{
if ((state == 2) && (getQuestItemsCount(player, TEST_INSTRUCTIONS2) > 0))
{
return "30745_03.htm";
}
}
else if ("30745_05b.htm".equals(htmltext))
{
if (state == 2)
{
if (getQuestItemsCount(player, LAUREL_LEAF_PIN) > 0)
{
takeItems(player, LAUREL_LEAF_PIN, 1);
}
for (Request r : REQUESTS1)
{
takeItems(player, r.request_id, -1);
takeItems(player, r.request_item, -1);
}
for (Request r : REQUESTS2)
{
takeItems(player, r.request_id, -1);
takeItems(player, r.request_item, -1);
}
}
}
else if (state == 2)
{
if ("30745-list1".equals(htmltext))
{
genList(st);
return formatList(st, REQUESTS1);
}
if ("30745-list2".equals(htmltext))
{
genList(st);
return formatList(st, REQUESTS2);
}
if (htmltext.startsWith("30745-request-"))
{
htmltext = htmltext.replaceFirst("30745-request-", "");
int requestId;
try
{
requestId = Integer.parseInt(htmltext);
}
catch (Exception e)
{
return null;
}
if (!isValidRequest(requestId))
{
return null;
}
giveItems(player, requestId, 1);
return "30745-" + requestId + ".htm";
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState st = player.getQuestState(getName());
final String htmltext = getNoQuestMsg(player);
if (st == null)
{
return htmltext;
}
final int state = st.getState();
final int npcId = npc.getId();
if (state == 1)
{
if (npcId != GREY)
{
return htmltext;
}
if (st.getPlayer().getLevel() < 35)
{
st.exitQuest(true);
return "30744_01.htm";
}
st.setCond(0);
st.unset("list");
return "30744_02.htm";
}
if (state != 2)
{
return htmltext;
}
if (npcId == GREY)
{
if (getQuestItemsCount(player, TEST_INSTRUCTIONS1) > 0)
{
if (calcItemsConds(player, ITEMS_1ST_CIRCLE) < 3)
{
return "30744_05.htm";
}
delItemsConds(player, ITEMS_1ST_CIRCLE);
takeItems(player, TEST_INSTRUCTIONS1, -1);
giveItems(player, CIRCLE_HUNTER_LICENSE1, 1);
st.setCond(2, true);
return "30744_06.htm";
}
if (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) > 0)
{
if (st.getPlayer().getLevel() < 45)
{
return "30744_07.htm";
}
if (getQuestItemsCount(player, TEST_INSTRUCTIONS2) == 0)
{
return "30744_08.htm";
}
}
if (getQuestItemsCount(player, TEST_INSTRUCTIONS2) > 0)
{
if (calcItemsConds(player, ITEMS_2ND_CIRCLE) < 3)
{
return "30744_11.htm";
}
delItemsConds(player, ITEMS_2ND_CIRCLE);
takeItems(player, TEST_INSTRUCTIONS2, -1);
takeItems(player, CIRCLE_HUNTER_LICENSE1, -1);
giveItems(player, CIRCLE_HUNTER_LICENSE2, 1);
st.setCond(3, true);
return "30744_12.htm";
}
else if (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) > 0)
{
return "30744_14.htm";
}
}
if (npcId == CYBELLIN)
{
if ((getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) == 0) && (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) == 0))
{
return "30746_01.htm";
}
if (getQuestItemsCount(player, CYBELLINS_REQUEST) == 0)
{
return "30746_02.htm";
}
final int bloodCrystalLevel = getBloodCrystalLevel(player);
if (bloodCrystalLevel == -1)
{
return "30746_08.htm";
}
if (bloodCrystalLevel == 0)
{
return "30746_09.htm";
}
if (bloodCrystalLevel == 1)
{
return "30746_04.htm";
}
if ((bloodCrystalLevel > 1) && (bloodCrystalLevel < 10))
{
return "30746_05.htm";
}
if ((bloodCrystalLevel == 10) && bloodCrystal2Adena(player, bloodCrystalLevel))
{
return "30746_05a.htm";
}
}
if (npcId == TOR)
{
if ((getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) == 0) && (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) == 0))
{
return "30745_01a.htm";
}
if (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) > 0)
{
final Request request = getCurrentRequest(player, REQUESTS1);
if (request != null)
{
return request.complete(st) ? "30745_06a.htm" : "30745_05.htm";
}
if (st.getPlayer().getLevel() < 45)
{
return "30745_01b.htm";
}
return (getQuestItemsCount(player, TEST_INSTRUCTIONS2) > 0) ? "30745_03.htm" : "30745_03a.htm";
}
else if (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) > 0)
{
final Request request = getCurrentRequest(player, REQUESTS2);
if (request == null)
{
return "30745_03b.htm";
}
return request.complete(st) ? "30745_06b.htm" : "30745_05.htm";
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getQuestState(player, false);
if ((st == null) || !st.isStarted())
{
return;
}
if (st.getState() != 2)
{
return;
}
final int npcId = npc.getId();
int[][][] itemsCircle = null;
if (getQuestItemsCount(player, TEST_INSTRUCTIONS1) > 0)
{
itemsCircle = ITEMS_1ST_CIRCLE;
}
else if (getQuestItemsCount(player, TEST_INSTRUCTIONS2) > 0)
{
itemsCircle = ITEMS_2ND_CIRCLE;
}
if (itemsCircle != null)
{
for (int[][] itemCond : itemsCircle)
{
for (int i = 2; i < itemCond.length; ++i)
{
if ((npcId == itemCond[i][0]) && (getRandom(100) < itemCond[i][1]) && (getQuestItemsCount(player, itemCond[0][0]) < itemCond[1][0]))
{
giveItems(player, itemCond[0][0], 1);
}
}
}
if (getQuestItemsCount(player, TEST_INSTRUCTIONS1) > 0)
{
final long hakasHeadCount = getQuestItemsCount(player, HAKAS_HEAD);
final long jakasHeadCount = getQuestItemsCount(player, JAKAS_HEAD);
final long markasHeadCount = getQuestItemsCount(player, MARKAS_HEAD);
if (npcId == BREKA_ORC_WARRIOR)
{
if ((hakasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(BREKA_OVERLORD_HAKA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((jakasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(BREKA_OVERLORD_JAKA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((markasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(BREKA_OVERLORD_MARKA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
}
else if (npcId == BREKA_OVERLORD_HAKA)
{
if (hakasHeadCount == 0)
{
giveItems(player, HAKAS_HEAD, 1);
}
}
else if (npcId == BREKA_OVERLORD_JAKA)
{
if (jakasHeadCount == 0)
{
giveItems(player, JAKAS_HEAD, 1);
}
}
else if (npcId == BREKA_OVERLORD_MARKA)
{
if (markasHeadCount == 0)
{
giveItems(player, MARKAS_HEAD, 1);
}
}
else if ((npcId == WINDSUS) && (getQuestItemsCount(player, WINDSUS_ALEPH_SKIN) == 0) && (getRandom(100) < 10))
{
addSpawn(WINDSUS_ALEPH, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
}
else if (getQuestItemsCount(player, TEST_INSTRUCTIONS2) > 0)
{
final long athusHeadCount = getQuestItemsCount(player, ATHUS_HEAD);
final long lankasHeadCount = getQuestItemsCount(player, LANKAS_HEAD);
final long triskasHeadCount = getQuestItemsCount(player, TRISKAS_HEAD);
final long moturasHeadCount = getQuestItemsCount(player, MOTURAS_HEAD);
final long kalathsHeadCount = getQuestItemsCount(player, KALATHS_HEAD);
if (npcId == TARLK_BUGBEAR_WARRIOR)
{
if ((athusHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(TARLK_RAIDER_ATHU, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((lankasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(TARLK_RAIDER_LANKA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((triskasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(TARLK_RAIDER_TRISKA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((moturasHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(TARLK_RAIDER_MOTURA, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
else if ((kalathsHeadCount == 0) && (getRandom(100) < 10))
{
addSpawn(TARLK_RAIDER_KALATH, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
}
else if (npcId == TARLK_RAIDER_ATHU)
{
if (athusHeadCount == 0)
{
giveItems(player, ATHUS_HEAD, 1);
}
}
else if (npcId == TARLK_RAIDER_LANKA)
{
if (lankasHeadCount == 0)
{
giveItems(player, LANKAS_HEAD, 1);
}
}
else if (npcId == TARLK_RAIDER_TRISKA)
{
if (triskasHeadCount == 0)
{
giveItems(player, TRISKAS_HEAD, 1);
}
}
else if (npcId == TARLK_RAIDER_MOTURA)
{
if (moturasHeadCount == 0)
{
giveItems(player, MOTURAS_HEAD, 1);
}
}
else if ((npcId == TARLK_RAIDER_KALATH) && (kalathsHeadCount == 0))
{
giveItems(player, KALATHS_HEAD, 1);
}
}
}
if ((getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE1) > 0) || (getQuestItemsCount(player, CIRCLE_HUNTER_LICENSE2) > 0))
{
if ((getQuestItemsCount(player, CYBELLINS_REQUEST) > 0) && (st.getPlayer().getActiveWeaponItem() != null) && (st.getPlayer().getActiveWeaponItem().getId() == 3471))
{
final int bloodCrystalLevel = getBloodCrystalLevel(player);
if ((bloodCrystalLevel > 0) && (bloodCrystalLevel < 10))
{
for (int lizardmen_id : Q_BLOOD_CRYSTAL_LIZARDMEN)
{
if (npcId == lizardmen_id)
{
if (getRandom(100) < 50)
{
takeItems(player, Q_BLOOD_CRYSTAL[bloodCrystalLevel], -1);
playSound(player, bloodCrystalLevel < 6 ? QuestSound.ITEMSOUND_QUEST_MIDDLE : QuestSound.ITEMSOUND_QUEST_JACKPOT);
giveItems(player, Q_BLOOD_CRYSTAL[bloodCrystalLevel + 1], 1);
}
else
{
for (int i : Q_BLOOD_CRYSTAL)
{
takeItems(player, i, -1);
}
giveItems(player, Q_BLOOD_CRYSTAL[0], 1);
}
}
}
}
}
Request request = getCurrentRequest(player, REQUESTS1);
if (request == null)
{
request = getCurrentRequest(player, REQUESTS2);
}
if (request != null)
{
if (request.droplist.containsKey(npcId) && (getRandom(100) < request.droplist.get(npcId)) && (getQuestItemsCount(player, request.request_item) < request.request_count))
{
giveItems(player, request.request_item, 1);
}
if (request.spawnlist.containsKey(npcId) && (getQuestItemsCount(player, request.request_item) < request.request_count))
{
final int[] spawnChance = request.spawnlist.get(npcId);
if (getRandom(100) < spawnChance[1])
{
addSpawn(spawnChance[0], npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
if (spawnChance[0] == 27149)
{
npc.broadcastSay(ChatType.GENERAL, "Show me the pretty sparkling things! They're all mine!");
}
}
}
}
}
if (((npcId == 27160) || (npcId == 27162) || (npcId == 27164)) && (getRandom(100) < 50))
{
npc.broadcastSay(ChatType.GENERAL, "We'll take the property of the ancient empire!");
addSpawn(27150, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
addSpawn(27150, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), true, 300000);
}
}
public static class Request
{
public int request_id;
public int request_item;
public int request_count;
public int reward_adena;
public String text;
public Map<Integer, Integer> droplist;
public Map<Integer, int[]> spawnlist;
public Request(int requestid, int requestitem, int requestcount, int rewardadena, String txt)
{
droplist = new HashMap<>();
spawnlist = new HashMap<>();
request_id = requestid;
request_item = requestitem;
request_count = requestcount;
reward_adena = rewardadena;
text = txt;
}
public Request addDrop(int killMobId, int chance)
{
droplist.put(killMobId, chance);
return this;
}
public Request addSpawn(int killMobId, int spawnMobId, int chance)
{
try
{
spawnlist.put(killMobId, new int[]
{
spawnMobId,
chance
});
}
catch (Exception e)
{
// Ignore.
}
return this;
}
public boolean complete(QuestState st)
{
final Player player = st.getPlayer();
if (getQuestItemsCount(player, request_item) < request_count)
{
return false;
}
takeItems(player, request_id, -1);
takeItems(player, request_item, -1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
giveItems(player, LAUREL_LEAF_PIN, 1);
giveAdena(player, reward_adena, true);
st.unset("list");
return true;
}
}
private static int packInt(int[] a, int bits) throws Exception
{
final int m = 32 / bits;
if (a.length > m)
{
throw new Exception("Overflow");
}
int result = 0;
final int mval = (int) MathUtil.pow(2, bits);
for (int i = 0; i < m; ++i)
{
result <<= bits;
int next;
if (a.length > i)
{
next = a[i];
if ((next >= mval) || (next < 0))
{
throw new Exception("Overload, value is out of range");
}
}
else
{
next = 0;
}
result += next;
}
return result;
}
private static int[] unpackInt(int value, int bits)
{
final int m = 32 / bits;
final int mval = (int) MathUtil.pow(2, bits);
final int[] result = new int[m];
int a = value;
for (int i = m; i > 0; --i)
{
final int next = a;
a >>= bits;
result[i - 1] = next - (a * mval);
}
return result;
}
}